diff --git a/bootstrap.py b/bootstrap.py index 8316955..78733bb 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -13,6 +13,7 @@ from pathlib import Path from flasgger import LazyJSONEncoder, Swagger from flask import Response from flask_restful import Api +from flask_cors import CORS import threading import hub_api.helpers.session_helper as sh @@ -28,8 +29,9 @@ from hub_api.energy_plus.idf_generator import IdfGenerator sh.begin_time = datetime.datetime.now() app = flask.Flask('cerc_api') app.json_provider_class = LazyJSONEncoder -api = Api(app) +api = Api(app) +CORS(app) api.add_resource(Uptime, '/v1.4/uptime') # Session diff --git a/requirements.txt b/requirements.txt index e99d08f..c891582 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ flask flask_restful>0.3.8 flask-apispec +flask_cors marshmallow apispec geomeppy