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=88ea470eedc0553bb1bd42bc68e7446da657210b;hb=8f2063d50f6d8520ca5f960c65e5eed2c5cd7bee;hpb=8eac3cc3f7f58f7490ab6714217d985b8992af70 diff --git a/src/emuvim/api/rest/network.py b/src/emuvim/api/rest/network.py index 88ea470..c4ab23f 100755 --- a/src/emuvim/api/rest/network.py +++ b/src/emuvim/api/rest/network.py @@ -38,6 +38,7 @@ 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 @@ -109,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