Mercurial > code > home > repos > homeauto
changeset 737:23b972df1856
cors support
Ignore-this: 8f628d753d9770b3b9b22be1194f3307
author | drewp@bigasterisk.com |
---|---|
date | Mon, 10 Feb 2020 00:03:11 -0800 |
parents | 98e0695e6ada |
children | 4167101b816f |
files | service/environment/environment.py |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/service/environment/environment.py Mon Feb 10 00:02:48 2020 -0800 +++ b/service/environment/environment.py Mon Feb 10 00:03:11 2020 -0800 @@ -14,7 +14,7 @@ from greplin.scales.cyclonehandler import StatsHandler from patchablegraph import PatchableGraph, CycloneGraphEventsHandler, CycloneGraphHandler from twilight import isWithinTwilight -from logsetup import log, enableTwistedLog +from standardservice.logsetup import log, verboseLogging from rdfdoc import Doc @@ -25,6 +25,12 @@ scales.PmfStat('update'), ) +class CycloneGraphEventsHandlerWithCors(CycloneGraphEventsHandler): + def flush(self): + self.set_header("Access-Control-Allow-Origin", "*") + return CycloneGraphEventsHandler.flush(self) + + @STATS.update.time() def update(masterGraph): stmt = lambda s, p, o: masterGraph.patchObject(ROOM.environment, s, p, o)