Answer the question
In order to leave comments, you need to log in
How to enable cors in strapi?
along the path /config/environments/development/security.json
I posted the following code
{
"cors": {
"enabled": true,
"origin": "*",
"expose": [
"WWW-Authenticate",
"Server-Authorization",
"Access-Control-Expose-Headers"
],
"maxAge": 31536000,
"credentials": true,
"methods": ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"],
"headers": [
"Content-Type",
"Authorization",
"X-Frame-Options",
"Origin",
"Access-Control-Allow-Headers"
]
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question