AWS and Azure seem to have a quick fix for this with an option to toggle while creating a Function, GCP does not as far as I know. I have spent the last week and a half reading any documentation, every video on youtube and no matter how I configure my function code and requirements, I can't get it to work. I keep getting the Access-Control-Allow-Origin error.
-
I have utilized:
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'POST, GET, OPTIONS');
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization'); -
I have changed the environment variable to include Access-Control-Allow-Origin', '*'
-
I even tried adding CORS to my openapi spec
What am I missing? Am I totally off? is there an obvious thing that I'm missing?
Any tip or tool or video or documentation that can lead me in the right direction would be much appreciated, thank you, Happy CORS Hunting!