HTTP CORS headers not included.
See original GitHub issueDescribe the bug
We have the following settings in our application properties
quarkus.http.cors=${QUARKUS_HTTP_CORS_ENABLED:true}
quarkus.http.cors.methods=${QUARKUS_HTTP_CORS_METHODS:GET,POST}
quarkus.http.cors.access-control-max-age=${QUARKUS_HTTP_CORS_ACCESS_CONTROL_MAX_AGE:24H}
Expected behavior
CORS headers included
Actual behavior
CORS headers not included.
However, changing the configuration (strangly enough) to
quarkus.http.cors=false
Or omitting this setting altogether will trigger the headers.
which seems to be in conflict to the documentation
How to Reproduce?
Service with quarkus.http.cors=false
:
https://publiek.broservices.nl/gm/gmw-v1.1/openapi
Service with
quarkus.http.cors=${QUARKUS_HTTP_CORS_ENABLED:true}
quarkus.http.cors.methods=${QUARKUS_HTTP_CORS_METHODS:GET,POST}
quarkus.http.cors.access-control-max-age=${QUARKUS_HTTP_CORS_ACCESS_CONTROL_MAX_AGE:24H}
https://publiek.broservices.nl/gm/gmn-v1.0/openapi
Output of uname -a
or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.3.1.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
mvn 3.6.3
Additional information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:25 (11 by maintainers)
Top Results From Across the Web
Cross-Origin Resource Sharing (CORS) - MDN Web Docs
Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, ...
Read more >CORS and the Access-Control-Allow-Origin response header
The Access-Control-Allow-Origin header is included in the response from one website to a request originating from another website, and identifies the permitted ...
Read more >CORS header 'Access-Control-Allow-Origin' missing
I'm calling this function from my asp.net form and getting following error on firebug console while calling ajax. Cross-Origin Request Blocked: The Same...
Read more >Fixing "No 'Access-Control-Allow-Origin' Header Present"
Sure, it tells you that there's a header missing, but from where is it missing, ... header is a Cross-Origin Resource Sharing (CORS)...
Read more >Resolve the "No 'Access-Control-Allow-Origin' header" error ...
HTTP /1.1 200 OK Server: nginx/1.10.2 Date: Mon, 01 May 2018 03:06:41 GMT ... If CORS headers are not returned in the response,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @phillip-kruger thanks… I’ll do my best to provide one as soon as possible (hopefully a bit later this week).
Just tried that locally.
No effect.