From caef9eeb267fa19bf370274538f97efc6d4b8776 Mon Sep 17 00:00:00 2001 From: Ernst Widerberg Date: Fri, 24 Sep 2021 09:08:28 +0200 Subject: Enable CORS --- src/wsgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wsgi.py') diff --git a/src/wsgi.py b/src/wsgi.py index 49c1c17..ef1e36f 100755 --- a/src/wsgi.py +++ b/src/wsgi.py @@ -104,7 +104,7 @@ class EPAdd(CollectorResource): def init(url_res_map, addr='', port=8000): - app = falcon.App() + app = falcon.App(cors_enable=True) for url, res in url_res_map: app.add_route(url, res) return make_server(addr, port, app) -- cgit v1.1 From f3204eecc33c60289ea0c2117ed3316beb59cde5 Mon Sep 17 00:00:00 2001 From: Ernst Widerberg Date: Tue, 28 Sep 2021 09:49:35 +0200 Subject: Fix: Add list of observations --- src/wsgi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wsgi.py') diff --git a/src/wsgi.py b/src/wsgi.py index ef1e36f..e99ac74 100755 --- a/src/wsgi.py +++ b/src/wsgi.py @@ -99,8 +99,8 @@ class EPAdd(CollectorResource): resp.text = CollectorResource.parse_error(decodedin) return - key = self._db.add(json_data) - resp.text = repr(key) + '\n' + keys = self._db.add(json_data) + resp.text = repr(keys) + '\n' def init(url_res_map, addr='', port=8000): -- cgit v1.1