From 714f3a8138e6c5e2201a9c6c1fa2f67a360eb0b3 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Sat, 29 Dec 2018 14:50:47 -0500 Subject: fix nginx config --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b550c4a..2c743bb 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Nginx config auth_request /validate; auth_request_set $auth_user $upstream_http_x_remote_user; + error_page 401 = @error_401; + + location @error_401 { + return 302 https://id.horel.org/login?next=$schem://$http_host$request_uri; location = /validate { internal; @@ -29,7 +33,7 @@ Nginx config proxy_set_header X-Original-URI $request_uri; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; - proxy_pass http://127.0.0.1:8080/; + proxy_pass http://127.0.0.1:8080/validate; } } -- cgit v1.2.3-70-g09d2