Lockout -> server/auth.py + per-IP failure budget (XFF trusted only behind the proxy); unit tests

This commit is contained in:
jozamudi committed 2026-09-16 01:31:40 +00:00
1 parent 826ee9165d
commit b70ef403a9
4 files changed
+127 -1

No files matched your search

+3 -1
View File
@@ -25,6 +25,8 @@ fi
# ANIWEB_SECURE=1: session cookie is Secure — only usable via the HTTPS
# proxy (plain http://<this machine>:8321 can no longer hold a session).
ANIWEB_SECURE=1 nohup .venv/bin/python -m uvicorn server.app:app --host 0.0.0.0 --port 8321 --timeout-graceful-shutdown 3 > server.log 2>&1 &
# ANIWEB_TRUST_XFF=1: behind that same local proxy, so X-Forwarded-For may
# be trusted for the per-IP login budget (server/auth.py).
ANIWEB_SECURE=1 ANIWEB_TRUST_XFF=1 nohup .venv/bin/python -m uvicorn server.app:app --host 0.0.0.0 --port 8321 --timeout-graceful-shutdown 3 > server.log 2>&1 &
echo $! > "$PIDF"
echo "ani-web on http://localhost:8321 (pid $(cat "$PIDF")) — use the HTTPS proxy to log in"