add /debug.cgi
This commit is contained in:
parent
962dcdb554
commit
b08b2d3baa
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user