aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Sorokin <me@ch1p.io>2024-04-03 04:05:00 +0300
committerEvgeny Sorokin <me@ch1p.io>2024-04-03 04:05:00 +0300
commitb08b2d3baa9433c1a603863f2f003f24be15000c (patch)
tree32a42d42a6351ed6f2b3c40bdf55d9161ff442d2
parent962dcdb554183cd5e1052ee700263403940268d9 (diff)
add /debug.cgi
-rwxr-xr-xbin/web_kbn.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/web_kbn.py b/bin/web_kbn.py
index 8226b40..add7af2 100755
--- a/bin/web_kbn.py
+++ b/bin/web_kbn.py
@@ -442,7 +442,7 @@ async def cams(req: web.Request):
mode = {'type': 'all'}
js_config = {
- 'host': config.app_config['cam_hls_host'],
+ 'host': config.app_config['hls_local_host'],
'proto': 'http',
'cams': cams,
'hlsConfig': {
@@ -552,6 +552,17 @@ async def routing_dhcp(req: web.Request):
context=dict(leases=leases, selected_tab='dhcp'))
+@routes.get('/debug.cgi')
+async def debug(req: web.Request):
+ info = dict(
+ headers=req.headers,
+ host=req.headers.get('Host'),
+ url=req.url,
+ method=req.method,
+ )
+ return await http.ajax_ok(info)
+
+
def init_web_app(app: web.Application):
app.middlewares.append(language_middleware)
aiohttp_jinja2.setup(