diff options
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -147,7 +147,14 @@ internal/web/ server.go (host router, middleware, render helpers) logins are logged with the username and address, and the login body is capped at `maxLoginBody` (64 KB) since it is the one POST outside `guardPOST`. `s.clientIP` is the peer address, or the last - `X-Forwarded-For` hop with `TRUST_PROXY` (earlier entries are forgeable). Flood + `X-Forwarded-For` hop with `TRUST_PROXY` (earlier entries are forgeable). + `secureHeaders` (`ServeHTTP`) puts `nosniff`, a `Referrer-Policy` and, + with `HTTPS`, HSTS on every response; the management paths on the root + host (`managementPaths` — add a new top-level management prefix there + as well as to `reservedPageSlugs`) also get `X-Frame-Options: DENY` and + a CSP of `frame-ancestors`/`base-uri`/`form-action`/`object-src` only — + no `script-src`, the dashboard's inline scripts are a product + constraint. Public blog pages carry no framing rule (owner content). Flood control for everything else stays at the reverse proxy (`limit_req`). - **Templates**: each page file is parsed together with its layout (`layouts/dashboard.html` or `layouts/blog.html` for `blog/*`) and all |
