summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xci/verify.sh1
-rw-r--r--docker/requirements.pip1
-rw-r--r--rest_server.py2
3 files changed, 4 insertions, 0 deletions
diff --git a/ci/verify.sh b/ci/verify.sh
index 84dc603..28d0886 100755
--- a/ci/verify.sh
+++ b/ci/verify.sh
@@ -23,6 +23,7 @@ pip install autoflake==0.6.6
pip install autopep8==1.2.2
pip install coverage==4.1
pip install flask==0.10
+pip install flask_cors==3.0.2
pip install flask-restful==0.3.5
pip install flask-restful-swagger==0.19
pip install flask-swagger==0.2.12
diff --git a/docker/requirements.pip b/docker/requirements.pip
index b9336e8..d1724fb 100644
--- a/docker/requirements.pip
+++ b/docker/requirements.pip
@@ -8,6 +8,7 @@ python-keystoneclient==1.6.0
keystoneauth1==2.12.1
matplotlib==1.3.1
flask==0.10
+flask_cors==3.0.2
flask-restful==0.3.5
flask-restful-swagger==0.19
flask-swagger==0.2.12
diff --git a/rest_server.py b/rest_server.py
index 574fc32..f6075f9 100644
--- a/rest_server.py
+++ b/rest_server.py
@@ -13,6 +13,7 @@ import os
import sys
from flask import abort, Flask, request, jsonify, send_from_directory
+from flask_cors import CORS, cross_origin
from flask_restful import Resource, Api, fields
from flask_restful_swagger import swagger
@@ -22,6 +23,7 @@ from storperf.storperf_master import StorPerfMaster
app = Flask(__name__, static_url_path="")
+CORS(app)
api = swagger.docs(Api(app), apiVersion='1.0')
storperf = StorPerfMaster()