Harden auth: same-origin check, live admin flag, 90-day refresh
- Refuse non-GET requests whose Origin (or Sec-Fetch-Site) is not the apex or www. SameSite=Lax lets sibling subdomains such as radar. and git. send the auth cookies. The WebSocket check shares the helper and no longer accepts localhost in production. - Take the admin flag from the user row the token check already loads, so a demotion applies on the next request, not on token expiry. - Cut the refresh token lifetime from 365 to 90 days; refreshes renew it. - Docs: fix the stale revocation notes in backend/README.md and the Cloudflare Access comment in routes.caddy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+1
-1
@@ -153,7 +153,7 @@ handle /radio/admin/* {
|
||||
}
|
||||
}
|
||||
|
||||
# The notes editor is on stppriv, behind Cloudflare Access.
|
||||
# The notes editor is on stppriv, behind its admin gate.
|
||||
handle /sb/* {
|
||||
redir https://priv.{$DOMAIN}{uri} 301
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user