diff --git a/server/app/__init__.py b/server/app/__init__.py index 3ee291b..7a06640 100644 --- a/server/app/__init__.py +++ b/server/app/__init__.py @@ -1,6 +1,6 @@ from .config import Development as Config from .models import * -from .extensions import db +from .extensions import cors, db from flask import Flask from werkzeug.middleware.proxy_fix import ProxyFix @@ -10,6 +10,7 @@ def create_app(): app.config.from_object(Config()) app.wsgi_app = ProxyFix(app.wsgi_app, x_proto = 1, x_host = 1) + cors.init_app(app=app) db.init_app(app=app) from .views import views diff --git a/server/app/extensions.py b/server/app/extensions.py index 589c64f..5e5713d 100644 --- a/server/app/extensions.py +++ b/server/app/extensions.py @@ -1,2 +1,4 @@ +from flask_cors import CORS +cors = CORS() from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() \ No newline at end of file