test(suites): fix backend endpoints (#3158)

pull/3160/head
James Elliott 2022-04-10 08:05:27 +10:00 committed by GitHub
parent 086b97d21f
commit cf93e66391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 37 additions and 2 deletions

View File

@ -45,7 +45,43 @@ http {
proxy_pass $backend_endpoint; proxy_pass $backend_endpoint;
} }
location /.well-known/openid-configuration { location /.well-known {
# Required by Authelia because "trust proxy" option is used.
# See https://expressjs.com/en/guide/behind-proxies.html
proxy_set_header X-Forwarded-Proto $scheme;
# Required by Authelia to build correct links for identity validation.
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-URI $request_uri;
# Needed for network ACLs to work. It appends the IP of the client to the list of IPs
# and allows Authelia to use it to match the network-based ACLs.
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_intercept_errors on;
proxy_pass $backend_endpoint;
}
location /locales {
# Required by Authelia because "trust proxy" option is used.
# See https://expressjs.com/en/guide/behind-proxies.html
proxy_set_header X-Forwarded-Proto $scheme;
# Required by Authelia to build correct links for identity validation.
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-URI $request_uri;
# Needed for network ACLs to work. It appends the IP of the client to the list of IPs
# and allows Authelia to use it to match the network-based ACLs.
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_intercept_errors on;
proxy_pass $backend_endpoint;
}
location /jwks.json {
# Required by Authelia because "trust proxy" option is used. # Required by Authelia because "trust proxy" option is used.
# See https://expressjs.com/en/guide/behind-proxies.html # See https://expressjs.com/en/guide/behind-proxies.html
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
@ -333,4 +369,3 @@ http {
return 301 https://home.example.com:8080/; return 301 https://home.example.com:8080/;
} }
} }