Skip to content

Commit

Permalink
Merge pull request #82 from ral-facilities/81_enable_cors
Browse files Browse the repository at this point in the history
Enable Cors
  • Loading branch information
keiranjprice101 authored Oct 3, 2019
2 parents 87e7bbb + 24c782a commit 1cf7dd9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ flask_restful == 0.3.7
sqlalchemy == 1.3.8
pymysql == 0.9.3
pyyaml == 5.1.2
flask-cors == 3.0.8
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
#
aniso8601==8.0.0 # via flask-restful
click==7.0 # via flask
flask==1.1.1 # via flask-restful
flask-cors==3.0.8
flask==1.1.1 # via flask-cors, flask-restful
flask_restful==0.3.7
itsdangerous==1.1.0 # via flask
jinja2==2.10.1 # via flask
markupsafe==1.1.1 # via jinja2
pymysql==0.9.3
pytz==2019.2 # via flask-restful
pyyaml==5.1.2
six==1.12.0 # via flask-restful
six==1.12.0 # via flask-cors, flask-restful
sqlalchemy==1.3.8
werkzeug==0.16.0 # via flask
2 changes: 2 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from flask import Flask
from flask_cors import CORS
from flask_restful import Api

from common.config import config
Expand Down Expand Up @@ -49,6 +50,7 @@
swagger_gen.write_swagger_spec()

app = Flask(__name__)
cors = CORS(app)
app.url_map.strict_slashes = False
api = Api(app)

Expand Down

0 comments on commit 1cf7dd9

Please sign in to comment.