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'}
|
mode = {'type': 'all'}
|
||||||
|
|
||||||
js_config = {
|
js_config = {
|
||||||
'host': config.app_config['cam_hls_host'],
|
'host': config.app_config['hls_local_host'],
|
||||||
'proto': 'http',
|
'proto': 'http',
|
||||||
'cams': cams,
|
'cams': cams,
|
||||||
'hlsConfig': {
|
'hlsConfig': {
|
||||||
@ -552,6 +552,17 @@ async def routing_dhcp(req: web.Request):
|
|||||||
context=dict(leases=leases, selected_tab='dhcp'))
|
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):
|
def init_web_app(app: web.Application):
|
||||||
app.middlewares.append(language_middleware)
|
app.middlewares.append(language_middleware)
|
||||||
aiohttp_jinja2.setup(
|
aiohttp_jinja2.setup(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user