diff --git a/app/app.py b/app/app.py index 074ad1f..7c16fd0 100644 --- a/app/app.py +++ b/app/app.py @@ -11,7 +11,10 @@ from flask import ( send_from_directory, request, ) +from flask_cors import CORS, cross_origin + app = Flask(__name__) +cors = CORS(app) # allow CORS for all domains on all routes. SWAGGER_URL = '/api/docs' # URL for exposing Swagger UI (without trailing '/') API_URL = 'http://petstore.swagger.io/v2/swagger.json' # Our API url (can of course be a local resource) diff --git a/app/requirements.txt b/app/requirements.txt index aa731a3..2b993c0 100644 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -14,4 +14,5 @@ flask-socketio Flask-Mail pycountry flask-swagger-ui -names \ No newline at end of file +names +flask-cors \ No newline at end of file