Set CORS header to allow status page to read these values.

This commit is contained in:
James Muscat committed 2015-04-15 15:00:39 +01:00
1 parent 4c314a9b9b
commit 3fc16cbb0a
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -184,6 +184,7 @@ def health_check():
@get('/stats/')
def stats():
response.set_header("Access-Control-Allow-Origin", "*")
return simplejson.dumps(statsCollector.getSummary())
+2 -1
View File
@@ -12,7 +12,7 @@ import zlib
import gevent
import simplejson
import zmq.green as zmq
from bottle import get, run as bottle_run
from bottle import get, response, run as bottle_run
from eddn.conf.Settings import Settings, loadConfig
from gevent import monkey
@@ -26,6 +26,7 @@ statsCollector.start()
@get('/stats/')
def stats():
response.set_header("Access-Control-Allow-Origin", "*")
return simplejson.dumps(statsCollector.getSummary())