Skip to content

Commit

Permalink
[proxy] remove unnecessary code and fix confusing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mayorova committed Mar 29, 2017
1 parent a38afcb commit 68a9f34
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions apicast/src/proxy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,9 @@ function _M:authorize(service, usage, credentials)
end
else -- TODO: proper error handling
if api_keys then api_keys:delete(cached_key) end
ngx.status = res.status
ngx.header.content_type = "application/json"
-- error_authorization_failed is an early return, so we have to reset cached_key to nil before -%>
error_authorization_failed(service)
end
-- set this request_to_3scale_backend to nil to avoid doing the out of band authrep -%>
-- set cached_key to nil to avoid doing the authrep in post_action
ngx.var.cached_key = nil
end
end
Expand Down

0 comments on commit 68a9f34

Please sign in to comment.