Created
March 21, 2014 15:15
-
-
Save jerzyn/9688534 to your computer and use it in GitHub Desktop.
Nginx commenting out unneeded lines
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
| -- if is_known ~= 200 then | |
| local res = ngx.location.capture("/threescale_authrep", { share_all_vars = true }) | |
| -- -- IN HERE YOU DEFINE THE ERROR IF CREDENTIALS ARE PASSED, BUT THEY ARE NOT VALID | |
| -- if res.status ~= 200 then | |
| -- -- remove the key, if it's not 200 let's go the slow route, to 3scale's backend | |
| -- api_keys:delete(ngx.var.cached_key) | |
| -- ngx.status = res.status | |
| -- ngx.header.content_type = "application/json" | |
| -- error_authorization_failed(service) | |
| -- else | |
| -- api_keys:set(ngx.var.cached_key,200) | |
| -- end | |
| -- ngx.var.cached_key = nil | |
| -- end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment