Spaces:
Running
Running
deploy at 2024-08-24 16:57:12.985098
Browse files
main.py
CHANGED
@@ -442,9 +442,10 @@ def post(login: Login, sess):
|
|
442 |
if not compare_digest(ADMIN_PWD.encode("utf-8"), login.pwd.encode("utf-8")):
|
443 |
# Incorrect password - add error message
|
444 |
return RedirectResponse("/login?error=True", status_code=303)
|
445 |
-
|
446 |
-
|
447 |
-
|
|
|
448 |
|
449 |
|
450 |
@app.get("/logout")
|
|
|
442 |
if not compare_digest(ADMIN_PWD.encode("utf-8"), login.pwd.encode("utf-8")):
|
443 |
# Incorrect password - add error message
|
444 |
return RedirectResponse("/login?error=True", status_code=303)
|
445 |
+
print(f"Session after setting auth: {sess}")
|
446 |
+
response = RedirectResponse("/admin", status_code=303)
|
447 |
+
print(f"Cookies being set: {response.headers.get('Set-Cookie')}")
|
448 |
+
return response
|
449 |
|
450 |
|
451 |
@app.get("/logout")
|