THREESCALE-10151 fix proxy policy doesn't send headers set by APIcast to the API Backend#1588
Open
tkan145 wants to merge 1 commit into
Open
THREESCALE-10151 fix proxy policy doesn't send headers set by APIcast to the API Backend#1588tkan145 wants to merge 1 commit into
tkan145 wants to merge 1 commit into
Conversation
39d97e1 to
2ee10c8
Compare
mayorova
reviewed
Jun 10, 2026
|
|
||
| local headers = ngx_req_get_headers(0, true) | ||
| headers["X-Real-IP"] = ngx.var.remote_addr | ||
| headers["X-3scale-debug"] = "" |
Contributor
There was a problem hiding this comment.
Suggested change
| headers["X-3scale-debug"] = "" | |
| headers["X-3scale-debug"] = nil |
The corresponding proxy_set_header X-3scale-debug ""; does actually remove the header if it is present, but in Lua we need to set it to nil to remove.
Otherwise, an empty X-3scale-debug header will be added to the request, which, I understand, is not what we want (because the header is only intended for APIcast itself).
mayorova
reviewed
Jun 10, 2026
| local res | ||
| res, err = httpc:request(request) | ||
|
|
||
| local inspect = require 'inspect' |
Contributor
There was a problem hiding this comment.
I guess these lines need to be removed as they were probably just added for debugging.
Contributor
Author
There was a problem hiding this comment.
good catch, removed.
2ee10c8 to
4f1ea19
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fix https://redhat.atlassian.net/browse/THREESCALE-10151
Verification steps: