-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
bug: proxy-rewrite header priority wrong #11587
Comments
The Header Priority mentioned in the document should refer to the priority of the header configuration to take effect, so the order of configuration application should be So will you raise a PR to fix this problem? :D |
@zhoujiexiong I have very little knowledge about Lua language, but I will try I suppose this is not much more than swapping some lines. Is there a dev-container I can use for a local build? |
@zhoujiexiong I followed there reference and got stuk at
Any suggestions? |
Did this step run successfully? And what is the output of |
@zhoujiexiong I tried rebuilding and now it won't build any more. I had to change the tar line from
No idea why, but I assume it has something to do with the Further I'm guessing the
My guess is I tried doing all from scratch, from a clean checkout with a clean new docker image build. That did not help. I keep getting stuck at this point now, or earlier if I remove the I use Rancher Desktop btw with moby as container engine all running on OSX aarch64. Any suggestions on how to get around this? |
@zhoujiexiong I managed to get it to compile and not give errors. I skip the docker mount and just do all editing in the container. Though running the testcase from the reference now gives me:
Any suggestions? |
Current Behavior
The current priority for header operations is:
add > remove > set
. This makes it impossible to handle the use-case where you want to add multiple headers with the same name but first remove all the headers with that name. The following configuration would make sense in my opinion:But due to the header priority
add > remove > set
this leads to no foo headers, as first they are added and then all removed again.Expected Behavior
The expected behaviour would be to have both foo headers added and all earlier foo headers removed. For this to work the priority order should be
remove > set > add
. Theset
operation is basically a shortcut forremove, add
but is confusing when you need a header multiple times, which set does not allow.Error Logs
No response
Steps to Reproduce
The resulting json is missing the expected
foo: bar1
andfoo: bar2
headers.Environment
apisix version
): Stock docker container with version 3.10.0uname -a
): Not relevant, but Ubuntu 24.04 LTSopenresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
): Not relevantluarocks --version
): Not relevantThe text was updated successfully, but these errors were encountered: