fix: redirect /login to / when AUTH_ENABLED=false (#3235)
This commit is contained in:
parent
573d431399
commit
12a7e741d0
1 changed files with 2 additions and 0 deletions
2
app.py
2
app.py
|
|
@ -784,6 +784,8 @@ async def serve_backgrounds(request: Request):
|
|||
|
||||
@app.get("/login")
|
||||
async def serve_login(request: Request):
|
||||
if not AUTH_ENABLED:
|
||||
return RedirectResponse(url="/", status_code=302)
|
||||
return _serve_html_with_nonce(request, abs_join(BASE_DIR, "static/login.html"))
|
||||
|
||||
@app.get("/api/version")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue