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

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

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())

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())