3

As I got CORS errors from a website I develop localy, I would like to disable CORS for testing. But there is only an enable switch (which I tried to solve the CORS error).

It is strange as even after manually enabling CORS with Access-Control-Allow-Origin '*', I still get this error:

from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource

-- added --

I got a bit further in using CORS by hints from this post: Fail to enable CORS for API Gateway functions

It is not enough to enable CORS, but also to add those extra header information.

Anyway, how to disable the CORS afterwards would still be the question.

Andreas
  • 523
  • 5
  • 15
  • we need more information - is this proxy or non proxy information? can you show us the gateway? etc – Ermiya Eskandary Dec 06 '21 at 07:54
  • It is proxy. I now also created a new hello world from codestar. Even there is cors enabled. Can it be true that one can enable CORS but not get rid of it? – Andreas Dec 06 '21 at 08:13

0 Answers0