How to disable CORS policy in DigitalOcean App platform and allow acces from any address?

2.1k Views Asked by At

I have a python web app running on DigitalOcean App platform, perfectly working with Postman. However, when I'm trying to make requests from my localhost or website, thay all are blocked by CORS with this message: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I've configured CORS in my app settings with my website domain as mentioned in DO docs, but It still not working. But somehow It works with Postman.

CORS config for my app: enter image description here

1

There are 1 best solutions below

0
On

Solved by adding content-type header in Access-Control-Allow-Headers