-
-
Save FirefoxMetzger/98a4665680cdcd1d04ceb5189269a007 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
location ^~ /sso/ { | |
location /sso/validate { | |
proxy_pass http://vouch:9090/validate; | |
proxy_set_header Host $http_host; | |
proxy_pass_request_body off; | |
} | |
location = /sso/logout { | |
proxy_pass http://vouch:9090/logout?url=https://your-project-name-here.eu.auth0.com/v2/logout?client_id={client_id_from_auth0}%26returnTo=http://localhost/; | |
proxy_set_header Host $http_host; | |
} | |
proxy_set_header Host $http_host; | |
proxy_pass http://vouch:9090/; | |
} | |
# uncomment this to forward static content of vouch-proxy | |
# used when running vouch-proxy with `testing: true` | |
location /static/ { | |
proxy_set_header Host $http_host; | |
proxy_pass http://vouch:9090/static/; | |
} | |
location / { | |
root /usr/share/nginx/html; | |
index index.html; | |
} | |
location /protected { | |
auth_request /sso/validate; | |
root /usr/share/nginx/html; | |
index index.html; | |
expires 0; | |
add_header Cache-Control "no-cache, no-store, must-revalidate, max-age=0"; | |
add_header Pragma "no-cache"; | |
error_page 401 = @prompt_login; | |
} | |
location @prompt_login { | |
return 302 http://localhost/sso/login?url=$scheme://$http_host$request_uri; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment