feat/dossiers-ngi: add Caddy handle docs for cascade sticky bar

This commit is contained in:
Hernâni Marques 2026-10-10 00:49:58 +02:00
parent 37ac6a2171
commit fe0c1e2b53
No known key found for this signature in database
2 changed files with 29 additions and 0 deletions

View file

@ -136,5 +136,30 @@ sudo ~/bin/caddy-apply
Stanza SoT: `scripts/dossiers-ngi/caddy-dossiers-ngi.snippet`.
## HTTP → HTTPS 308
Shared Caddy HTTP list already `redir https://{host}{uri} permanent` (308).
`dossiers.ngi.hacktivism.ch` was missing there → HTTP `200` empty body /
Firefox `NS_ERROR_NET_EMPTY_RESPONSE`. HTTPS site body stays untouched.
On koopa (hernani, then root apply):
```bash
# SoT: scripts/dossiers-ngi/apply-dossiers-ngi-http-308.sh
cp /path/to/apply-dossiers-ngi-http-308.sh ~/bin/
chmod +x ~/bin/apply-dossiers-ngi-http-308.sh
bash ~/bin/apply-dossiers-ngi-http-308.sh
sudo ~/bin/caddy-apply
```
Smoke after apply:
```bash
curl -sSI http://dossiers.ngi.hacktivism.ch/ | grep -Ei 'HTTP|location'
# 308 Location: https://dossiers.ngi.hacktivism.ch/
```
`.2` / `.3` stay off this list unless `SITE=` is set.
Caddy edition map must list each `editions/<slug>` explicitly. A map output of `{http.request.cookie.tdpd_edition}` did not expand on Caddy v2.11.4 (only `flask` worked → 404 for `main`/views). After new tips appear, refresh the snippet map (or regenerate from `ls editions`) before `apply-dossiers-ngi-edition-switch` + `caddy-apply`.