dev server uses admin login too: localhost shows the public view

Drop open_access; run() prints a one-off PHYSCOM_ADMIN_TOKEN when none is set.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-09-25 17:27:55 -05:00
parent 8171fc023e
commit af401d6bc2
6 changed files with 25 additions and 26 deletions

View File

@@ -60,7 +60,7 @@ Skipped until something forces them:
| Item | Status |
|------|--------|
| 1.1 gunicorn, debug off | Done. Dev server debug only with `FLASK_DEBUG=1`. |
| 1.2 read-only public mode | Done. Deviation: an unset token means *nobody* can write under gunicorn, instead of "localhost can write", because behind a reverse proxy every request looks like localhost. The dev server stays open until a token is set. |
| 1.2 read-only public mode | Done. Deviation: an unset token means *nobody* can write under gunicorn, instead of "localhost can write", because behind a reverse proxy every request looks like localhost. The dev server uses the same login; without a token it prints a one-off one. |
| 1.3 cookie hardening | Done. `Secure` is opt-in via `PHYSCOM_SECURE_COOKIES=1` so plain-HTTP local Docker can still log in. |
| 1.4 explore | Done. Verified it never writes; it costs about 45 ms per call (measured over 168 combos). Non-finite inputs are now rejected. No app-level rate limit: add one at the proxy if needed. |
| 1.5 secret key | Done differently: instead of refusing to start, an unset key is generated once and saved next to the DB. |