MONAI-OHIF-Viewer / nginx.conf
radames's picture
fix
ff0f910
raw
history blame
2.46 kB
server {
listen 4444 default_server;
server_name _;
# 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 /ms {
# Proxy pass to the app at /
rewrite ^/ms/(.*)$ /$1 break;
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;
proxy_request_buffering off;
proxy_max_temp_file_size 0;
client_max_body_size 0;
}
location /orthanc {
# Proxy pass to the backend at http://0.0.0.0:8042
proxy_pass http://0.0.0.0:8042/;
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;
}
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;
}
}