Add simple cors config

master
esensar 2018-05-18 00:39:45 +02:00
parent a006a6ac5f
commit 44d5d67b40
2 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@ from flask_api import FlaskAPI
from flask_sqlalchemy import SQLAlchemy
from flask_bcrypt import Bcrypt
from flasgger import Swagger
from flask_cors import CORS
app = FlaskAPI(__name__, instance_relative_config=True)
app.config.from_object('config')
@ -10,6 +11,7 @@ app.config.from_pyfile('config.py', silent=True)
db = SQLAlchemy(app)
bcrypt = Bcrypt(app)
swagger = Swagger(app, template_file='swagger/template.yaml')
CORS(app)
def setup_blueprints(app):

View File

@ -7,6 +7,7 @@ flasgger==0.8.3
Flask==1.0.2
Flask-API==1.0
Flask-Bcrypt==0.7.1
Flask-Cors==3.0.4
Flask-Migrate==2.1.1
Flask-MQTT==1.0.3
Flask-RESTful==0.3.6