edit: patch XHR Request dengan coverage lebih luas dari monkeyPatchXML
This commit is contained in:
@@ -85,6 +85,14 @@ function createDicomWebApi(dicomWebConfig, servicesManager) {
|
||||
if (authHeaders && authHeaders.Authorization) {
|
||||
xhrRequestHeaders.Authorization = authHeaders.Authorization;
|
||||
}
|
||||
|
||||
const authToken = sessionStorage.getItem('ohif-auth-token');
|
||||
if (!authToken) {
|
||||
window.location.href = '/login';
|
||||
return;
|
||||
}
|
||||
xhrRequestHeaders.Authorization = `Bearer ${authToken}`;
|
||||
|
||||
return xhrRequestHeaders;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user