Skip to content

Instantly share code, notes, and snippets.

@kevinprince
Created February 21, 2012 00:07
Show Gist options
  • Save kevinprince/1872460 to your computer and use it in GitHub Desktop.
Save kevinprince/1872460 to your computer and use it in GitHub Desktop.
nginx proxy pass with auth loop
#may not be exactly correct syntax but you get the idea
location / {
#bleh usual nginx conf
valid_token = subrequest_to_something('token')
if valid_token{
#do proxy pass
} else {
#redirect to /auth
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment