CorsService's `Access-Control-Allow-Headers` wildcard compatibility
See original GitHub issueUsers may configure Access-Control-Allow-Headers using CorsServiceBuilder#allowRequestHeaders and set allowRequestHeaders as wildcard (*) to allow all headers.
However, it has compatibility issue because Internet Explorer, Safari and Firefox for Android don’t support:

So I guess that CorsService doesn’t support allowing all headers. And it would be fixed by returning requested Access-Control-Request-Headers header and providing an option:
allowAllRequestHeaders() {
allowAllRequestHeaders(false);
}
allowAllRequestHeaders(boolean useWildcard) {
...
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
"Access-Control-Allow-Headers" | Can I use... Support tables ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >Enabling Cross-Origin Requests (CORS) - ASP.NET
When using MVC to enable CORS the same CORS services are used, but the CORS middleware ... or is the wildcard value “*”,...
Read more >CORS Access-Control-Allow-Headers wildcard being ignored?
Support for wildcards in the Access-Control-Allow-Headers header was added to the living standard only in May 2016, so it may not be ...
Read more >Cross-origin resource sharing - Wikipedia
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources on a ... a wildcard indicating that the requests from all domains...
Read more >fruitcake/php-cors - Packagist
... and is compatible with the options for CorsService. ... allowedHeaders, Sets the Access-Control-Allow-Headers response header.
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

That’s not what I wanted. I just didn’t know about those headers could be ommited.
That’s true. In this case, the browser will set the
Content-TypetoAccess-Control-Request-Headersand the response should containContent-TypeinAccess-Control-Allow-Headerswhich meansContent-Typeneeds to be set viaCorsServiceBuilder#allowRequestHeaders.I thought @minwoox wanted to override additional restrictions 😄. Even
application/jsonis not allowed ifContent-Typeis not specified in the allowed header.Either way is fine for me, though.