mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 22:37:44 +00:00
Bug fixes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import tornado
|
||||
from tornado.httpclient import AsyncHTTPClient
|
||||
from tornado.httputil import HTTPHeaders
|
||||
from tornado.iostream import StreamClosedError
|
||||
|
||||
|
||||
class V1RedirectHandler(tornado.web.RequestHandler):
|
||||
@@ -43,7 +44,6 @@ class V1RedirectHandler(tornado.web.RequestHandler):
|
||||
self.add_header(name, value)
|
||||
if response.body:
|
||||
self.write(response.body)
|
||||
await self.finish()
|
||||
|
||||
async def get(self, path):
|
||||
await self._proxy(path)
|
||||
|
||||
+9
-1
@@ -155,7 +155,15 @@ class WebServer:
|
||||
V1APISpotsStreamHandler,
|
||||
{"sse_spot_broadcaster": self._spot_broadcaster, **handler_opts},
|
||||
),
|
||||
(r"/api/v1/spot", V1APISpotHandler),
|
||||
(
|
||||
r"/api/v1/spot",
|
||||
V1APISpotHandler,
|
||||
{
|
||||
"spots": self._data_store.spots,
|
||||
"spot_providers": self._data_providers,
|
||||
**handler_opts,
|
||||
},
|
||||
),
|
||||
(r"/api/v1/(.*)", V1RedirectHandler),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user