diff options
author | Mark Beierl <mark.beierl@dell.com> | 2017-06-05 18:00:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-06-05 18:00:38 +0000 |
commit | c8beb26dff69dde0b41685504718a5f2bb29b4cd (patch) | |
tree | 877dd8e949460881823c659a1f34b4597bb3da21 /rest_server.py | |
parent | 73ae1dae45a61926588ad16866721a0cf03f0ff7 (diff) | |
parent | 5596aa1f65580af279b27569fbddac292cbcc2a6 (diff) |
Merge "Adding CORS Adds flask-cors module so that SwaggerUI can examine content from a different container JIRA: STORPERF-129"
Diffstat (limited to 'rest_server.py')
-rw-r--r-- | rest_server.py | 2 |
1 files changed, 2 insertions, 0 deletions
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() |