X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fvim-emu.git;a=blobdiff_plain;f=src%2Femuvim%2Fapi%2Frest%2Fnetwork.py;h=c4ab23f26ee466be4b1b167a1f0c9930e0a21994;hp=5375943e58ff8b6da911ee1878b473350bc95f2b;hb=8f2063d50f6d8520ca5f960c65e5eed2c5cd7bee;hpb=bf1754e2241e389c3b1dc14fb7d30ac58492e2e7 diff --git a/src/emuvim/api/rest/network.py b/src/emuvim/api/rest/network.py index 5375943..c4ab23f 100755 --- a/src/emuvim/api/rest/network.py +++ b/src/emuvim/api/rest/network.py @@ -38,7 +38,9 @@ from flask import request 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 +110,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