Skip to content

Commit

Permalink
Update orthanc-service.conf (#2402)
Browse files Browse the repository at this point in the history
  • Loading branch information
jawadqur authored Nov 7, 2023
1 parent c6aeccd commit e1e2fde
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions kube/services/revproxy/gen3.nginx.conf/orthanc-service.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,6 @@ location /orthanc/ {
set $authz_method "create";
set $authz_service "orthanc";

if ($request_uri ~ "^/orthanc/dicom-web/studies/") {
set $authz_method "read";
set $authz_resource "/services/orthanc/studies";

if ($request_method = POST) {
return 403;
# set $authz_method "create";
# set $authz_resource "/services/orthanc/studies";
}
}

auth_request /gen3-authz;

proxy_set_header Authorization "Basic cHVibGljOmhlbGxv";
Expand All @@ -30,3 +19,23 @@ location /orthanc/ {
# no limit to payload size so we can upload large DICOM files
client_max_body_size 0;
}

location /orthanc/dicom-web/studies/ {
set $authz_method "read";
set $authz_resource "/services/orthanc/studies";
set $authz_service "orthanc";

auth_request /gen3-authz;
if ($request_method = POST) {
return 403;
}
proxy_set_header Authorization "Basic cHVibGljOmhlbGxv";

set $proxy_service "orthanc";
set $upstream http://orthanc-service.$namespace.svc.cluster.local;
rewrite ^/orthanc/(.*) /$1 break;
proxy_pass $upstream;

# no limit to payload size so we can upload large DICOM files
client_max_body_size 0;
}

0 comments on commit e1e2fde

Please sign in to comment.