Skip to content

Instantly share code, notes, and snippets.

@jerzyn
Created March 21, 2014 15:15
Show Gist options
  • Select an option

  • Save jerzyn/9688534 to your computer and use it in GitHub Desktop.

Select an option

Save jerzyn/9688534 to your computer and use it in GitHub Desktop.
Nginx commenting out unneeded lines
-- 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