noirbizarre / flask-restplus

Fully featured framework for fast, easy and documented API development with Flask
http://flask-restplus.readthedocs.org
Other
2.73k stars 506 forks source link

"Can't read from server" when using Ngrok to make localhost tunnel #301

Open rizkiaditya24 opened 7 years ago

rizkiaditya24 commented 7 years ago

Hi, I've got an error whenever I try to make a localhost tunnel using Ngrok. If I go to the URL provided by ngrok, It should display the Swagger UI instead I got "Can't read from server. It may not have the appropriate access-control-origin settings." .

If I access to localhost, it works just fine, but when I access the ngrok URL, it doesn't work at all. How to make it works, so that I can access the Swagger UI via ngrok url?

synweap15 commented 7 years ago

Please check if adding Flask-CORS library will solve your problem.

rizkiaditya24 commented 7 years ago

@synweap15 I've tried to add flask-cors, and I see there's "Access-Control-Allow-Origin: *" in the header for every response, but it still doesn't work.

martijnarts commented 6 years ago

Do you see any other errors in the devtools console?

chakravarthi-vl commented 3 years ago

@rizkiaditya24 did you found any solution for this?