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.