nginx configs
This commit is contained in:
parent
c81f42d915
commit
045df2ea34
@ -1,5 +1,17 @@
|
|||||||
server {
|
server {
|
||||||
|
listen [::]:80 default_server;
|
||||||
listen 80;
|
listen 80;
|
||||||
include /etc/nginx/enabled-sites/*.conf;
|
|
||||||
|
proxy_intercept_errors off;
|
||||||
|
gzip on;
|
||||||
|
gzip_types text/css application/javascript application/json image/svg+xml;
|
||||||
|
gzip_comp_level 9;
|
||||||
|
etag on;
|
||||||
|
|
||||||
|
charset utf-8;
|
||||||
|
|
||||||
|
# max upload size
|
||||||
client_max_body_size 250M;
|
client_max_body_size 250M;
|
||||||
|
|
||||||
|
include /etc/nginx/enabled-sites/*.conf;
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,15 @@ location / {
|
|||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
try_files $uri $uri/ /index.html;
|
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 same-origin;
|
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||||
|
|
||||||
|
add_header Cross-Origin-Opener-Policy same-origin;
|
||||||
|
add_header Cross-Origin-Embedder-Policy require-corp;
|
||||||
|
add_header Cross-Origin-Resource-Policy same-origin;
|
||||||
|
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||||||
}
|
}
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
error_page 500 502 503 504 /50x.html;
|
||||||
@ -20,9 +22,16 @@ location = /50x.html {
|
|||||||
|
|
||||||
# https://book.orthanc-server.com/faq/nginx.html#nginx
|
# https://book.orthanc-server.com/faq/nginx.html#nginx
|
||||||
location /orthanc/ {
|
location /orthanc/ {
|
||||||
proxy_pass http://orthanc:8042;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header HOST $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
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 $scheme;
|
||||||
|
|
||||||
|
expires 0;
|
||||||
|
add_header Cache-Control private;
|
||||||
|
|
||||||
|
proxy_pass http://orthanc:8042/;
|
||||||
|
|
||||||
rewrite /orthanc(.*) $1 break;
|
rewrite /orthanc(.*) $1 break;
|
||||||
|
|
||||||
add_header 'Access-Control-Allow-Credentials' 'true';
|
add_header 'Access-Control-Allow-Credentials' 'true';
|
||||||
|
Loading…
Reference in New Issue
Block a user