Commit 31d89657 authored by Daniel LACROIX's avatar Daniel LACROIX
Browse files

revert nginx auth until the Etherpad authentication handle rights

parent fd7028b2
...@@ -20,6 +20,36 @@ server { ...@@ -20,6 +20,36 @@ server {
root /usr/share/nginx/html/; root /usr/share/nginx/html/;
} }
location /pads/p {
rewrite /pads/?(.+) /$1 break;
proxy_pass http://localhost:9001/;
proxy_redirect / /pads/;
proxy_buffering off;
auth_request /pads/auth;
auth_request_set $auth_status $upstream_status;
auth_request_set $auth_redirect "$scheme://$host$request_uri";
error_page 401 = /pads/auth_401;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
location = /pads/auth {
internal;
proxy_pass $AUTH_URL;
proxy_pass_request_body off;
proxy_pass_request_headers on;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
}
location = /pads/auth_401 {
return 302 "/sso/login?ticket=false&service=$auth_redirect";
}
# Relocate root url # Relocate root url
location /pads/ { location /pads/ {
rewrite /pads/?(.+) /$1 break; rewrite /pads/?(.+) /$1 break;
...@@ -31,6 +61,7 @@ server { ...@@ -31,6 +61,7 @@ server {
proxy_set_header Connection "Upgrade"; proxy_set_header Connection "Upgrade";
} }
# deny access to .htaccess files, if Apache's document root # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one # concurs with nginx's one
# #
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment