diff --git a/platform/ui-next/src/components/SidePanel/SidePanel.tsx b/platform/ui-next/src/components/SidePanel/SidePanel.tsx index ed1f7d2..6a67311 100644 --- a/platform/ui-next/src/components/SidePanel/SidePanel.tsx +++ b/platform/ui-next/src/components/SidePanel/SidePanel.tsx @@ -294,9 +294,20 @@ const SidePanel = ({ return; } + // Create request headers with Authorization if token exists + const authToken = window.sessionStorage.getItem('ohif-auth-token'); + + const headers: HeadersInit = {}; + if (authToken) { + headers['Authorization'] = `Bearer ${authToken}`; + } + // Fetch data with specific fields including Accession Number const response = await fetch( - `${qidoRootUrl}/studies?includefield=00080050&StudyInstanceUID=${studyInstanceUID}` + `${qidoRootUrl}/studies?includefield=00080050&StudyInstanceUID=${studyInstanceUID}`, + { + headers, + } ); if (!response.ok) {