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

Same name action request headers don't work properly #10132

Open
clarzte opened this issue Feb 14, 2024 · 0 comments
Open

Same name action request headers don't work properly #10132

clarzte opened this issue Feb 14, 2024 · 0 comments
Labels
k/bug Something isn't working

Comments

@clarzte
Copy link

clarzte commented Feb 14, 2024

Version Information

Server Version: v2.37.0-cloud.1

Environment

Cloud

What is the current behaviour?

I have 2 env vars called X and Y with different hostnames (URLs) as values.
Having this configuration set up for a Hasura action (on the screenshot below) and sending the Origin header with a Y value Hasura replaces it with an X value.
When I switch the order of the X and Y I get the correct value, but then when I send the header with X value I get the wrong value in my app again. Seems like whatever is at the top for the same name header takes precedence.

What is the expected behaviour?

Hasura allows 2 values of the Origin header and passes the same header to the server that was sent by the client.

How to reproduce the issue?

  1. Define a mutation Hasura action, it could be whatever just set the headers as on the screenshot (You can even skip the From env var option and just use the Value remember they have to be different.
  2. Set the webhook handler (f.e. you can use https://webhook.site/)
  3. Call Hasura action with two different Origin headers that you set up
  4. Check the Origin headers that were passed on your unique https://webhook.site/ link

Screenshots or Screencast

image
image

Any possible solutions/workarounds you're aware of?

None

Keywords

headers, same name headers

@clarzte clarzte added the k/bug Something isn't working label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant