This commit is contained in:
zino
2023-12-05 17:23:56 +01:00
parent f3a1ac6a8c
commit 10f40557af

View File

@@ -22,6 +22,10 @@ server {
# send all requests to the `/validate` endpoint for authorization
auth_request /validate;
resolver 127.0.0.11 valid=60s ipv6=off;
resolver_timeout 10s;
set $upstream "vouch:9090";
location = /validate {
# forward the /validate request to Vouch Proxy
#proxy_pass http://127.0.0.1:9090/validate;
@@ -29,9 +33,6 @@ server {
# forward the /validate request to Vouch Proxy
#proxy_pass http://vouch:9090/validate;
# be sure to pass the original host header
proxy_set_header Host $http_host;
@@ -46,10 +47,7 @@ server {
auth_request_set $auth_resp_jwt $upstream_http_x_vouch_jwt;
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 valid=60s ipv6=off;
resolver_timeout 10s;
set $upstream vouch:9090;
proxy_pass http://$upstream/validate;
}