Hello, I have a stupid question and I’m not sure it is directly linked to Pulumi, but I’m sure you must have faced simiral issues 😄.
I have a project with an API created by API from pulumi/cloud-aws. At the beginning everything was fine, I could get Json responses to my call.
But now I face CORS issues, so I tried to solve it by adding headers to my all my responses, and returning 204 to every call OPTIONS (It’s not great but I’m just trying to make things work for a small PoC)
Now every route seems fine, I don’t have the same issues as before, but all my responses body are Json, base 64 encoded 🙃.
Do you know why it that and how could I go back to a state of having Json body as responses ?
I always use Response.status().json(myObject) in my controllers
The headers I added are the following :
‘Access-Control-Allow-Origin’ -> ‘*’
‘Access-Control-Allow-Headers’ -> ‘Origin, X-Requested-With, Content-Type, Accept, Content-Length, Accept-Encoding, X-CSRF-Token, Authorization, Cache-Control, Access-Control-Request-Headers, devToken, email’
‘Access-Control-Allow-Methods’ -> ‘POST, GET, OPTIONS, PUT, DELETE’