Skip to content

Commit

Permalink
fix: sync nginx template from bench changes (#1241)
Browse files Browse the repository at this point in the history
  • Loading branch information
revant authored Oct 20, 2023
1 parent be174a1 commit 7f8d794
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions resources/nginx-template.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ server {

location /socket.io {
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Frappe-Site-Name ${FRAPPE_SITE_NAME_HEADER};
Expand All @@ -54,9 +52,9 @@ server {
}

location / {
rewrite ^(.+)/$ $proxy_x_forwarded_proto://${FRAPPE_SITE_NAME_HEADER}$1 permanent;
rewrite ^(.+)/index\.html$ $proxy_x_forwarded_proto://${FRAPPE_SITE_NAME_HEADER}$1 permanent;
rewrite ^(.+)\.html$ $proxy_x_forwarded_proto://${FRAPPE_SITE_NAME_HEADER}$1 permanent;
rewrite ^(.+)/$ $1 permanent;
rewrite ^(.+)/index\.html$ $1 permanent;
rewrite ^(.+)\.html$ $1 permanent;

location ~ ^/files/.*.(htm|html|svg|xml) {
add_header Content-disposition "attachment";
Expand All @@ -67,8 +65,9 @@ server {
}

location @webserver {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frappe-Site-Name ${FRAPPE_SITE_NAME_HEADER};
proxy_set_header Host $host;
proxy_set_header X-Use-X-Accel-Redirect True;
Expand Down

0 comments on commit 7f8d794

Please sign in to comment.