mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-07 10:53:04 +03:00
Set CORS header to allow status page to read these values.
This commit is contained in:
parent
4c314a9b9b
commit
3fc16cbb0a
@ -184,6 +184,7 @@ def health_check():
|
|||||||
|
|
||||||
@get('/stats/')
|
@get('/stats/')
|
||||||
def stats():
|
def stats():
|
||||||
|
response.set_header("Access-Control-Allow-Origin", "*")
|
||||||
return simplejson.dumps(statsCollector.getSummary())
|
return simplejson.dumps(statsCollector.getSummary())
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import zlib
|
|||||||
import gevent
|
import gevent
|
||||||
import simplejson
|
import simplejson
|
||||||
import zmq.green as zmq
|
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 eddn.conf.Settings import Settings, loadConfig
|
||||||
|
|
||||||
from gevent import monkey
|
from gevent import monkey
|
||||||
@ -26,6 +26,7 @@ statsCollector.start()
|
|||||||
|
|
||||||
@get('/stats/')
|
@get('/stats/')
|
||||||
def stats():
|
def stats():
|
||||||
|
response.set_header("Access-Control-Allow-Origin", "*")
|
||||||
return simplejson.dumps(statsCollector.getSummary())
|
return simplejson.dumps(statsCollector.getSummary())
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user