Added CORS extension
This commit is contained in:
parent
f7c6081ca0
commit
ce4694830d
@ -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
|
||||
|
@ -1,2 +1,4 @@
|
||||
from flask_cors import CORS
|
||||
cors = CORS()
|
||||
from flask_sqlalchemy import SQLAlchemy
|
||||
db = SQLAlchemy()
|
Loading…
Reference in New Issue
Block a user