docs: the /docs redirect answers http:// to an https client because nginx does not know it is behind TLS #1482

Closed
opened 2026-10-27 13:40:34 +00:00 by sam · 0 comments
Owner

Found while deploying the /docs path split (2026-09-22).

FACT
The docs_site nginx container is the stock image and does not know it is behind Traefik/Cloudflare, so its directory redirect is absolute and scheme-blind: GET https://offloaded.dev/docs -> 301 Location: http://offloaded.dev/docs/. The client follows it back to https via Cloudflare/Traefik.

IMPACT
Low. Only the no-trailing-slash form hits it, and MkDocs emits trailing-slash links everywhere, so normal navigation never goes through it. It is a wrong scheme in a Location header on an HTTPS site, which is worth removing rather than leaving as a curiosity.

FIX
absolute_redirect off in the docs_site container config (makes the Location relative), or an X-Forwarded-Proto-aware config. Costs a container recreate, which is why it is not urgent.

RELATED
Same deploy introduced the /docs mount; docs_site_reports_enabled stays false until the reports router lands.

Close reason

Duplicate: the GitHub side closed not planned as a duplicate — the same stock nginx /docs trailing-slash redirect behaviour was reported one second apart from the survivor issue, which stays tracked by its open bead (archie-core-mnpj). Carrying two beads for one report would double-file the work.


Imported from beads archie-core-o3g3 · GitHub #1164 · type chore · priority P3 · created 2026-09-22 · closed 2026-09-29

Found while deploying the /docs path split (2026-09-22). FACT The docs_site nginx container is the stock image and does not know it is behind Traefik/Cloudflare, so its directory redirect is absolute and scheme-blind: GET https://offloaded.dev/docs -> 301 Location: http://offloaded.dev/docs/. The client follows it back to https via Cloudflare/Traefik. IMPACT Low. Only the no-trailing-slash form hits it, and MkDocs emits trailing-slash links everywhere, so normal navigation never goes through it. It is a wrong scheme in a Location header on an HTTPS site, which is worth removing rather than leaving as a curiosity. FIX absolute_redirect off in the docs_site container config (makes the Location relative), or an X-Forwarded-Proto-aware config. Costs a container recreate, which is why it is not urgent. RELATED Same deploy introduced the /docs mount; docs_site_reports_enabled stays false until the reports router lands. ### Close reason Duplicate: the GitHub side closed not planned as a duplicate — the same stock nginx /docs trailing-slash redirect behaviour was reported one second apart from the survivor issue, which stays tracked by its open bead (archie-core-mnpj). Carrying two beads for one report would double-file the work. --- _Imported from beads `archie-core-o3g3` · GitHub #1164 · type chore · priority P3 · created 2026-09-22 · closed 2026-09-29_
sam added the lowchore labels 2026-10-27 13:40:34 +00:00
sam self-assigned this 2026-10-27 13:40:34 +00:00
sam closed this issue 2026-10-27 13:40:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1482