Same Origin Policy Violated On Localhost With Falcon Webserver
I am running an elm frontend via elm-reactor on localhost:8000. It is supposed to load json files from a falcon backend running via gunicorn on localhost:8010. This fails. The fron
Solution 1:
Try this. Hopefully, this will solve your problem.
import falcon
from falcon_cors import CORS
cors = CORS(allow_origins_list=['http://localhost:8080', 'http://localhost:8000', 'http://localhost:8010'], allow_all_headers=True, allow_methods_list=['GET', 'POST', 'OPTIONS'])
api = falcon.API(middleware=[cors.middleware])
Post a Comment for "Same Origin Policy Violated On Localhost With Falcon Webserver"