Last active
August 29, 2015 14:07
-
-
Save willread/670d717ccca32e4f2131 to your computer and use it in GitHub Desktop.
Authenticating static files in nginx with a REST api
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
location / { | |
proxy_pass http://localhost:3000; | |
auth_request /api-qa/user; | |
} | |
error_page 401 /auth.html; | |
error_page 403 /auth.html; | |
location ~ /api|api|auth|css|fonts|favicon|images/ { | |
auth_request off; | |
proxy_pass http://localhost:3000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment