Merge pull request #1044 from YunoHost/fix-sso-unavailable

[fix] Make sure app nginx confs do not prevent the loading of /yunohost/sso
This commit is contained in:
Alexandre Aubin 2020-09-03 23:48:22 +02:00 committed by GitHub
commit 0ea492bef9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -0,0 +1,7 @@
# Avoid the nginx path/alias traversal weakness ( #1037 )
rewrite ^/yunohost/sso$ /yunohost/sso/ permanent;
location /yunohost/sso/ {
# This is an empty location, only meant to avoid other locations
# from matching /yunohost/sso, such that it's correctly handled by ssowat
}

View file

@ -14,7 +14,7 @@ server {
include /etc/nginx/conf.d/{{ domain }}.d/*.conf; include /etc/nginx/conf.d/{{ domain }}.d/*.conf;
location /yunohost/admin { location /yunohost {
return 301 https://$http_host$request_uri; return 301 https://$http_host$request_uri;
} }
@ -60,6 +60,7 @@ server {
include /etc/nginx/conf.d/{{ domain }}.d/*.conf; include /etc/nginx/conf.d/{{ domain }}.d/*.conf;
include /etc/nginx/conf.d/yunohost_sso.conf.inc;
include /etc/nginx/conf.d/yunohost_admin.conf.inc; include /etc/nginx/conf.d/yunohost_admin.conf.inc;
include /etc/nginx/conf.d/yunohost_api.conf.inc; include /etc/nginx/conf.d/yunohost_api.conf.inc;