X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fapi%2Frest%2Fnetwork.py;h=10baa8f7d305bc287caed302b5164b7f9aa4b378;hb=a5a0ea08373c54e0855efad1dcc83d67ba577943;hp=88ea470eedc0553bb1bd42bc68e7446da657210b;hpb=4fac2afba3182039dae6216d267d13eb3b98a56f;p=osm%2Fvim-emu.git diff --git a/src/emuvim/api/rest/network.py b/src/emuvim/api/rest/network.py index 88ea470..10baa8f 100755 --- a/src/emuvim/api/rest/network.py +++ b/src/emuvim/api/rest/network.py @@ -39,6 +39,8 @@ 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 @@ -109,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