m
This commit is contained in:
@@ -27,7 +27,7 @@ server {
|
||||
#proxy_pass http://127.0.0.1:9090/validate;
|
||||
|
||||
# forward the /validate request to Vouch Proxy
|
||||
proxy_pass http://vouch:9090/validate;
|
||||
#proxy_pass http://vouch:9090/validate;
|
||||
|
||||
|
||||
|
||||
@@ -47,19 +47,16 @@ server {
|
||||
auth_request_set $auth_resp_err $upstream_http_x_vouch_err;
|
||||
auth_request_set $auth_resp_failcount $upstream_http_x_vouch_failcount;
|
||||
|
||||
#resolver 127.0.0.11;
|
||||
#set $upstream "http://172.18.0.12:9090/validate";
|
||||
#proxy_pass $upstream;
|
||||
resolver 127.0.0.11 valid=1s;
|
||||
resolver_timeout 10s;
|
||||
set $upstream "vouch:9090/validate";
|
||||
proxy_pass http://$upstream;
|
||||
}
|
||||
|
||||
# if validate returns `401 not authorized` then forward the request to the error401block
|
||||
error_page 401 = @error401;
|
||||
|
||||
location @error401 {
|
||||
#resolver 127.0.0.11;
|
||||
#set $upstream "https://vouch:9090/login?url=$scheme://$http_host$request_uri&vouch-failcount=$auth_resp_failcount&X-Vouch-Token=$auth_resp_jwt&error=$auth_resp_err";
|
||||
#proxy_pass $upstream;
|
||||
|
||||
# redirect to Vouch Proxy for login
|
||||
return 302 https://vouch.armos.zinomedia.de/login?url=$scheme://$http_host$request_uri&vouch-failcount=$auth_resp_failcount&X-Vouch-Token=$auth_resp_jwt&error=$auth_resp_err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user