Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[proxy] remove unnecessary code and fix confusing comments #344

Merged
merged 1 commit into from
Mar 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Do not return stale service configuration when new one is available [PR #333](https://github.com/3scale/apicast/pull/333)
- Memory leak in every request [PR #339](https://github.com/3scale/apicast/pull/339)
- Remove unnecessary code and comments [PR #344](https://github.com/3scale/apicast/pull/344)

## [3.0.0-beta3] - 2017-03-20

Expand Down
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