/
CORS
CORS
You can handle it by enabling CORS across the whole app like this
from flask_cors import CORS
app = Flask(__name__, instance_relative_config=True)
cors = CORS(app, support_credentials=True)
On the routes using
from flask_cors import CORS
@bp.route('/login')
@cross_origin(origin='*')
# this will accept from all origins
def login():
On routes indicating credentials will be supplied
from flask_cors import cross_origin
@bp.route('/authorize')
@cross_origin(supports_credentials=True)
def authorize():