mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-27 01:15:08 +00:00
fix: nginx private files
This commit is contained in:
parent
aaddb22849
commit
8f842d7f18
1 changed files with 6 additions and 6 deletions
|
|
@ -14,7 +14,7 @@ map $http_x_forwarded_proto $proxy_x_forwarded_proto {
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8080;
|
listen 8080;
|
||||||
server_name $http_host;
|
server_name ${FRAPPE_SITE_NAME_HEADER};
|
||||||
root /home/frappe/frappe-bench/sites;
|
root /home/frappe/frappe-bench/sites;
|
||||||
|
|
||||||
proxy_buffer_size 128k;
|
proxy_buffer_size 128k;
|
||||||
|
|
@ -37,7 +37,7 @@ server {
|
||||||
|
|
||||||
location ~ ^/protected/(.*) {
|
location ~ ^/protected/(.*) {
|
||||||
internal;
|
internal;
|
||||||
try_files /$http_host/$1 =404;
|
try_files /${FRAPPE_SITE_NAME_HEADER}/$1 =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /socket.io {
|
location /socket.io {
|
||||||
|
|
@ -47,16 +47,16 @@ server {
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
proxy_set_header X-Frappe-Site-Name ${FRAPPE_SITE_NAME_HEADER};
|
proxy_set_header X-Frappe-Site-Name ${FRAPPE_SITE_NAME_HEADER};
|
||||||
proxy_set_header Origin $scheme://$http_host;
|
proxy_set_header Origin $scheme://${FRAPPE_SITE_NAME_HEADER};
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
proxy_pass http://socketio-server;
|
proxy_pass http://socketio-server;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
rewrite ^(.+)/$ $proxy_x_forwarded_proto://$http_host$1 permanent;
|
rewrite ^(.+)/$ $proxy_x_forwarded_proto://${FRAPPE_SITE_NAME_HEADER}$1 permanent;
|
||||||
rewrite ^(.+)/index\.html$ $proxy_x_forwarded_proto://$http_host$1 permanent;
|
rewrite ^(.+)/index\.html$ $proxy_x_forwarded_proto://${FRAPPE_SITE_NAME_HEADER}$1 permanent;
|
||||||
rewrite ^(.+)\.html$ $proxy_x_forwarded_proto://$http_host$1 permanent;
|
rewrite ^(.+)\.html$ $proxy_x_forwarded_proto://${FRAPPE_SITE_NAME_HEADER}$1 permanent;
|
||||||
|
|
||||||
location ~ ^/files/.*.(htm|html|svg|xml) {
|
location ~ ^/files/.*.(htm|html|svg|xml) {
|
||||||
add_header Content-disposition "attachment";
|
add_header Content-disposition "attachment";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue