projects
/
osm
/
vim-emu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #197 from mpeuster/master
[osm/vim-emu.git]
/
src
/
emuvim
/
api
/
rest
/
network.py
diff --git
a/src/emuvim/api/rest/network.py
b/src/emuvim/api/rest/network.py
index
5375943
..
10baa8f
100755
(executable)
--- 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)
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
net = None
@@
-108,7
+111,7
@@
class NetworkAction(Resource):
monitor=monitor,
monitor_placement=monitor_placement)
# return setChain response
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.")
except Exception as ex:
logging.exception("API error.")
- return ex.message, 500
\ No newline at end of file
+ return ex.message, 500, CORS_HEADER