Merge remote-tracking branch 'upstream/master'
[osm/vim-emu.git] / src / emuvim / api / rest / network.py
index 88ea470..10baa8f 100755 (executable)
@@ -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