MONAI-OHIF-Viewer / nginx.conf
radames's picture
patch monailabel
fc7d6ca
raw
history blame
2.34 kB
server {
listen 4444 default_server;
server_name _;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
add_header Cross-Origin-Opener-Policy same-origin;
add_header Cross-Origin-Embedder-Policy require-corp;
add_header Cross-Origin-Resource-Policy cross-origin;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
}
# location / {
# # Proxy pass to the app at /ohif
# proxy_pass http://0.0.0.0:8000/ohif/;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection 'upgrade';
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_cache_bypass $http_upgrade;
# proxy_read_timeout 86400;
# proxy_redirect off;
# # Handling URI
# proxy_set_header X-Forwarded-Prefix "/";
# }
location /monailabel {
# Proxy pass to the app at /ohif
proxy_pass http://0.0.0.0:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_bypass $http_upgrade;
proxy_read_timeout 86400;
proxy_redirect off;
}
location /orthanc {
# Serve backend from port
proxy_pass http://0.0.0.0:8042;
rewrite /orthanc(.*) $1 break;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_bypass $http_upgrade;
proxy_read_timeout 86400;
proxy_redirect off;
proxy_request_buffering off;
proxy_max_temp_file_size 0;
client_max_body_size 0;
}
}