Created
May 5, 2020 21:04
-
-
Save bengalih/9f6722506852c70111c82bbf23bdaf41 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
location / { | |
satisfy any; | |
allow 10.10.10.0/24; | |
deny all; | |
auth_basic "Authorized Users Only"; | |
auth_basic_user_file secure/.htpasswd; | |
auth_request /auth-0; | |
try_files $uri @proxy; | |
} | |
location /api { | |
allow all; | |
try_files $uri @proxy; | |
} | |
location ~ ^/auth-(.*) { | |
## Has to be local ip or local DNS name | |
proxy_pass http://10.10.10.102:6742/api/?v1/auth&group=$1; | |
proxy_pass_request_body off; | |
proxy_set_header Content-Length ""; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment