Reputation: 103
{
"Access-Control-Allow-Headers": "Content-Type",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "PUT,OPTIONS"
}
originally I was using this since my API is a PUT request but it kept saying that one of my header fields (called access) was being rejected.
I then did this but to no avail.
{
"Access-Control-Allow-Headers": "Content-Type",
"Access-Control-Allow-Origin": "access",
"Access-Control-Allow-Methods": "PUT,OPTIONS"
}
Upvotes: 0
Views: 54
Reputation: 10254
You must put your header to Access-Control-Allow-Headers
:
Access-Control-Allow-Headers: Content-Type, access
Upvotes: 1