fix(datasource): attach auth headers for delete requests in the dicomweb datasource (#4619)
This commit is contained in:
parent
a3d1844c2a
commit
8d0ed80e0c
@ -1,4 +1,4 @@
|
|||||||
export default function (wadoRoot) {
|
export default function (wadoRoot, getAuthrorizationHeader) {
|
||||||
return {
|
return {
|
||||||
series: (StudyInstanceUID, SeriesInstanceUID) => {
|
series: (StudyInstanceUID, SeriesInstanceUID) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@ -10,6 +10,12 @@ export default function (wadoRoot) {
|
|||||||
const xhr = new XMLHttpRequest();
|
const xhr = new XMLHttpRequest();
|
||||||
xhr.open('POST', url, true);
|
xhr.open('POST', url, true);
|
||||||
|
|
||||||
|
const headers = getAuthrorizationHeader();
|
||||||
|
|
||||||
|
for (const key in headers) {
|
||||||
|
xhr.setRequestHeader(key, headers[key]);
|
||||||
|
}
|
||||||
|
|
||||||
//Send the proper header information along with the request
|
//Send the proper header information along with the request
|
||||||
// TODO -> Auth when we re-add authorization.
|
// TODO -> Auth when we re-add authorization.
|
||||||
|
|
||||||
|
|||||||
@ -598,7 +598,7 @@ function createDicomWebApi(dicomWebConfig: DicomWebConfig, servicesManager) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (dicomWebConfig.supportsReject) {
|
if (dicomWebConfig.supportsReject) {
|
||||||
implementation.reject = dcm4cheeReject(dicomWebConfig.wadoRoot);
|
implementation.reject = dcm4cheeReject(dicomWebConfig.wadoRoot, getAuthorizationHeader);
|
||||||
}
|
}
|
||||||
|
|
||||||
return IWebApiDataSource.create(implementation);
|
return IWebApiDataSource.create(implementation);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user