-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
CORS Preflight responses missing Access-Control-Request-Headers
#16208
Comments
@YunaBraska, it looks like it is a formatting issue. So it should certainly return |
Properties looks like the same... My config
Browser Request:
Quarkus response:
Browser error: |
@YunaBraska Can you remove |
Hm it doesn't work either, its totally ignoring my CORS config.... My current workaround is to create a |
I'm seeing the same issue. However, the issue only seems to occur when compiling to a native image. When running in dev mode (JRE based) CORS is working fine. |
@MarkusKramer experiencing the same issue. Did you find a solution or workaround? |
For me it works fine until the native image |
I'm using this as workaround (writting in Kotlin):
It works in dev mode and native image, from locahost and from remote hosts. |
Just wanted to confirm that I'm still seeing this issue with quarkus 2.5.0.Final. The browser requests "Access-Control-Request-Headers: content-type,x-build", quarkus responds with "access-control-allow-headers: content-type" only, despite having set "quarkus.http.cors=true" in the application config. |
Just happened to me, I tested it in dev and quarkus returns x-build in the allow headers, but when I run it with docker it only returns |
@sberyozkin what should be done with this issue? |
Will be looking at this issue next week |
HI All, I've opened a PR confirming Quarkus correctly manages this CORS header, #29682 |
Describe the bug
I am unable to find the right setting to automatically set the
Access-Control-Request-Headers
in the Preflight/Options response. I tried using the settingquarkus.http.cors.headers
by yaml config but that doesn't produce any header response on the OPTIONS endpoints (https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS#preflighted_requests_in_cors
).Wildcards aren't valid anymore.
Expected behavior
Quarkus generates all valid headers
Access-Control-Request-Headers
e.g. from the configquarkus.http.cors.headers
and outputs this to the OPTION response.Example
Actual behavior
Access-Control-Request-Headers
are missingmy request:
my current response
Fronend/Browser blocks the request
ccess to XMLHttpRequest at 'http://localhost:8081/users/login' from origin 'http://localhost:8080' has been blocked by CORS policy
My config:
To Reproduce
The text was updated successfully, but these errors were encountered: