Add custom header cause request method change from GET to OPTIONS
See original GitHub issueHi,
I’m dealing with this trouble.
With this call everything works
SkinSvc.one(skinId).customGET('events', params).then(success, error);
With this one with custom header a OPTIONS Http request is send to my API instead of GET request.
SkinSvc.one(skinId).customGET('events', params, {'Cache-Control':'no-cache'}).then(success, error);
Issue Analytics
- State:
- Created 8 years ago
- Comments:5
Top Results From Across the Web
How do you send a custom header in a CORS preflight ...
I can see jQuery making the OPTIONS request, but it doesn't send the custom header along. Methods I've tried: Using the beforeSend option:...
Read more >Access-Control-Allow-Headers - HTTP - MDN Web Docs
It indicates that a custom header named X-Custom-Header is supported by CORS ... OPTIONS /resource/foo Access-Control-Request-Method: GET ...
Read more >request - Cypress Documentation
Cypress sets the Accepts request header and serializes the response body by the encoding option. method (String). Make a request using a specific...
Read more >HTTP header manipulation - Envoy Proxy
Envoy will always set the :scheme header while processing a request. ... request of the form GET /docs/thing HTTP/1.1 would have a :method...
Read more >Troubleshoot CORS errors from API Gateway - AWS
You can't use the x-apigw-api-id custom header, because it initiates a preflight OPTIONS request that doesn't include the header. API calls that ...
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
Thank you, i solved adding this headers to option request
The OPTIONS request is a part of CORS (Cross Origin Resource Scripting). Your server should be checking the request and returning the correct headers for a given request (
Access-Control-Allow-Credentials
,Access-Control-Allow-Headers
,Access-Control-Allow-Methods
,Access-Control-Allow-Origin
, etc…) More detailed info can be found on the MDN page for CORS