-
I have a setup where I'm using a web server on the domain www.example.com, and running Gunicorn (without using any framework like Flask...) on www.example.com:8888. I have a page, www.example.com/index.html, where I make a fetch request to www.example.com:8888. If I do it from localhost, there is no problem. (Using 127.0.0.1/iindex.html y 127.0.0.1:8888 Thanks in Advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Well, I have the answer.
|
Beta Was this translation helpful? Give feedback.
Well, I have the answer.
The issue is that in browsers, when there are cross-domain requests, they usually send a preflight request to check the CORS configuration of the server. What needs to be done in the Python application is to add the following code at the beginning of the file. This will handle the response appropriately.