Set Origin header to the request Origin
See original GitHub issueI want to allow every Origin to use my API, but it seems I can’t do it with the * sign, cause I need to authorize on it, which ends up telling me the following: A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true.
So how do I dynamically just send the origin to the request origin?
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Origin - HTTP - MDN Web Docs
The Origin request header indicates the origin (scheme, hostname, and port) that caused the request. For example, if a user agent needs to ......
Read more >How to set the Origin Request Header - Stack Overflow
In short: you cannot. As described on MDN; Origin is a 'forbidden' header, meaning that you cannot change it programatically.
Read more >origin-header in cors - liveBook · Manning
The Origin header is always present on cross-origin requests, and the client has no way of setting or overriding the value. This is...
Read more >Adding custom headers to origin requests - Amazon CloudFront
You can configure CloudFront to add custom headers to the requests that it sends to your origin. These custom headers enable you to...
Read more >CORS and the Access-Control-Allow-Origin response header
The CORS specification identifies a collection of protocol headers of which Access-Control-Allow-Origin is the most significant. This header is returned by a ...
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 FreeTop 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
Top GitHub Comments
It doesn’t seem to accept the lambda as of version 1.0.0. This is what worked for me:
This proc evaluates the given source, always accepting it, and returning the request origin.
Origin can be a proc, so something like this should work: