CORS issue? #395
-
I've tried adding a domain to the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
The Could you share what you you have in your Payload config for CSRF? Perhaps you're setting it as a string and not in a an array? I'm happy to look if you have more info to share, thanks! |
Beta Was this translation helpful? Give feedback.
-
UPDATE: I misread the docs / am a CORS noob and this is not needed, see the correct reply below!
|
Beta Was this translation helpful? Give feedback.
-
I added cors to Payload config but when cross origin request if made, payload is returning html string in the response's body instead of a json file. How do I deal with that? |
Beta Was this translation helpful? Give feedback.
The
Access-Control-Allow-Origin
header should be included automatically in the API after you have added it to your config.Could you share what you you have in your Payload config for CSRF? Perhaps you're setting it as a string and not in a an array?
Could it be that you're using an env variable that isn't available with your deployment?
I'm happy to look if you have more info to share, thanks!