X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fapi%2Frest%2Fnetwork.py;h=10baa8f7d305bc287caed302b5164b7f9aa4b378;hb=08f91be07d9124986dacf05b7cd87eb8d3d8b338;hp=5375943e58ff8b6da911ee1878b473350bc95f2b;hpb=bf1754e2241e389c3b1dc14fb7d30ac58492e2e7;p=osm%2Fvim-emu.git diff --git a/src/emuvim/api/rest/network.py b/src/emuvim/api/rest/network.py index 5375943..10baa8f 100755 --- a/src/emuvim/api/rest/network.py +++ b/src/emuvim/api/rest/network.py @@ -39,6 +39,9 @@ import json logging.basicConfig(level=logging.INFO) +CORS_HEADER = {'Access-Control-Allow-Origin': '*'} + +# the global net is set from the topology file, and connected via connectDCNetwork function in rest_api_endpoint.py net = None @@ -108,7 +111,7 @@ class NetworkAction(Resource): monitor=monitor, monitor_placement=monitor_placement) # return setChain response - return str(c), 200 + return str(c), 200, CORS_HEADER except Exception as ex: logging.exception("API error.") - return ex.message, 500 \ No newline at end of file + return ex.message, 500, CORS_HEADER