DEV Community

loading...

Discussion on: Fast way to enable CORS in Flask servers

Collapse
rajojon23 profile image
rajojon23

I had the same issue. I ended up using the code from the flask cors documentation:

from flask import Flask
from flask_cors import CORS

app = Flask(name)
CORS(app)

@app.route("/")
def helloWorld():
return "Hello, cross-origin-world!"