1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ethercalc_ynh.git synced 2024-09-03 18:26:36 +02:00

Update nginx.conf

This commit is contained in:
ericgaspar 2020-11-03 17:18:53 +01:00
parent 1b4ef93c61
commit 3f5dee549f
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -4,44 +4,19 @@ location ^~ / {
rewrite ^ https://$server_name$request_uri? permanent;
}
location __PATH__/ {
proxy_pass http://127.0.0.1:8000;
# auth_basic "Viewer Only";
# auth_basic_user_file .htpasswd;
}
proxy_pass http://127.0.0.1:__PORT__/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
location ~ __PATH__/\. {
deny all;
}
location ~ __PATH__/edit$ {
proxy_pass http://127.0.0.1:8000;
auth_basic "Editor Only";
auth_basic_user_file .htpasswd;
}
# Example for mounting under /ethercalc
location __PATH__ {
return 301 $scheme://$server_name$request_uri/;
}
location __PATH__/ {
proxy_pass http://127.0.0.1:8000;
rewrite /ethercalc(/.*) $1 break;
}
location __PATH__/socket.io {
proxy_pass http://127.0.0.1:8000;
rewrite /ethercalc(/.*) $1 break;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
### Uncomment this if running with --basepath /path/prefix
location __PATH__/zappa/socket/__local/ {
rewrite (.*) /path/prefix$1;
}
}
proxy_http_version 1.1;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
more_clear_input_headers 'Accept-Encoding';
}