Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bengalih/9f6722506852c70111c82bbf23bdaf41 to your computer and use it in GitHub Desktop.
Save bengalih/9f6722506852c70111c82bbf23bdaf41 to your computer and use it in GitHub Desktop.
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