Created
August 24, 2018 01:01
-
-
Save matutter/494e402ca16ea01ea4b22bf44b9b5f87 to your computer and use it in GitHub Desktop.
Using an internal authentication service to verify requests.
This file contains hidden or 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
| http { | |
| #... | |
| server { | |
| #... | |
| location /private/ { | |
| auth_request /auth; | |
| auth_request_set $auth_status $upstream_status; | |
| } | |
| location = /auth { | |
| internal; | |
| proxy_pass http://auth-server; | |
| proxy_pass_request_body off; | |
| proxy_set_header Content-Length ""; | |
| proxy_set_header X-Original-URI $request_uri; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment