Wrong CORS headers when duplicate header in Access-Control-Request-Headers
in v0.40.8
#1208
Open
4 of 5 tasks
Labels
bug
Something is not working.
Preflight checklist
Ory Network Project
No response
Describe the bug
Today I've tried to update oatheeper from
v0.40.7
tov0.40.8
. I'm using as API gateway in front of my backend services.It created a very odd bug for Firefox users: the CORS headers stopped working for them. But everything was working correctly on Google Chrome...
I reproduced the bug in my local environment, and did a bit of debugging to understand what is going on.
It seems that in the
v0.40.8
Oathkeeper does not return the expected CORS headers if they're duplicated.For instance if I have a header
Access-Control-Request-Headers: b3,traceparent,x-b3-sampled,x-b3-spanid,x-b3-traceid
it will work, but if I haveAccess-Control-Request-Headers: b3,b3,traceparent,x-b3-sampled,x-b3-spanid,x-b3-traceid
it won't work.The only difference is that the
b3
is duplicated in the second version. I don't know why theb3
is duplicated by the way and I don't have control over it. But the server should still return the correct CORS headers even when the header is duplicated.Reproducing the bug
When I run this it works
But if I run this it does not work
Relevant log output
No response
Relevant configuration
No response
Version
v0.40.8
On which operating system are you observing this issue?
None
In which environment are you deploying?
Ory Network
Additional Context
No response
The text was updated successfully, but these errors were encountered: