After making a CORS request, I received the following set of headers from the server for the preflight OPTIONS
request:
Access-Control-Allow-Headers:authorization
Access-Control-Allow-Methods:POST, OPTIONS
Access-Control-Allow-Origin:*
Connection:Keep-Alive
Content-Length:0
Content-Type:application/json
Date:Sat, 09 Dec 2017 21:02:47 GMT
Keep-Alive:timeout=5, max=100
Server:Apache
Although the subsequent POST
request was successful, I am still encountering an error in the console.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'bla-bla-bla.com' is therefore not allowed access.
If an opaque response serves your needs,
set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Should the POST response also include the header Access-Control-Allow-Origin:*?
Do I need to take any additional actions from the client side to enable CORS? Thanks :)