Opens monitor without login
This commit is contained in:
parent
4d4d0f986f
commit
ba982e3a4e
2
main.py
2
main.py
|
|
@ -87,8 +87,6 @@ def control_page(request: Request):
|
||||||
|
|
||||||
@app.get("/monitor-page", response_class=HTMLResponse)
|
@app.get("/monitor-page", response_class=HTMLResponse)
|
||||||
def monitor_page(request: Request):
|
def monitor_page(request: Request):
|
||||||
if request.session.get("user") != USERNAME:
|
|
||||||
return RedirectResponse("/", status_code=HTTP_302_FOUND)
|
|
||||||
with open("static/monitor.html") as f:
|
with open("static/monitor.html") as f:
|
||||||
return HTMLResponse(f.read())
|
return HTMLResponse(f.read())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user