diff --git a/pmg/__init__.py b/pmg/__init__.py index a4b5a1e1..f64bf61c 100644 --- a/pmg/__init__.py +++ b/pmg/__init__.py @@ -3,6 +3,7 @@ import os from flask import Flask +from flask_cors import CORS from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_caching import Cache @@ -26,6 +27,7 @@ integrations=[FlaskIntegration()]) app = Flask(__name__, static_folder="static") +CORS(app) app.config.from_pyfile("../config/config.py") # setup logging diff --git a/requirements.txt b/requirements.txt index 96d62e7a..09ea8545 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,6 +25,7 @@ Flask==2.0.0 Flask-Admin==1.6.1 Flask-Assets==0.10 Flask-Caching==2.0.2 +Flask-Cors==5.0.0 Flask-Login==0.3.0 Flask-Mail==0.9.1 flask-marshmallow==0.7.0