Cut the edge over from nginx and certbot to Caddy
Caddy takes nginx's place in compose: ports 80/443, the fixed address 172.28.255.251 that cloudflared pins the public names to, the network aliases, the healthcheck and the autoheal label. nginx and certbot are removed from compose; Caddy already holds its own certificates in ./caddy/data, obtained while it ran beside nginx. `traffic` now tails logs/caddy/payloads.log, and the dev override switches Caddy to its dev sites instead of putting nginx in DEV_MODE. Docs and comments that described nginx's behaviour now describe Caddy's: CLAUDE.md, DEPLOYMENT.md (topology, boot paths, TLS, rate limits, runbook with a rollback, rough edges), the READMEs, .env.example and the comments in the backend, Python service, Vue source and infra files. nginx/ and certbot/ stay in the repo as the rollback until this has settled. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* (a non-admin would only bounce off /admin's guard back to here).
|
||||
*
|
||||
* The `?redirect=` is set by two different gates: the SPA router guard
|
||||
* (`meta.requiresAdmin`) and nginx's `auth_request` gate in front of the
|
||||
* (`meta.requiresAdmin`) and Caddy's `forward_auth` gate in front of the
|
||||
* proxied containers (/notes/, /sb/, /receipt/). The latter means the
|
||||
* destination is frequently NOT a Vue route, so see goTo() below.
|
||||
*
|
||||
@@ -34,12 +34,12 @@ const errorMsg = ref("");
|
||||
|
||||
// Send the browser to `dest`, choosing SPA navigation vs. a real page load.
|
||||
//
|
||||
// nginx bounces /notes/, /sb/, /receipt/ and the like here when the session
|
||||
// Caddy bounces /notes/, /sb/, /receipt/ and the like here when the session
|
||||
// is missing; those paths belong to other containers, so router.push() would just
|
||||
// match the catch-all 404 route and never leave the SPA. Resolving the path
|
||||
// first tells us which it is: the catch-all matches everything, so landing on
|
||||
// the route named "404" means no real Vue route exists and the browser needs a
|
||||
// full document request for nginx to proxy it.
|
||||
// full document request for Caddy to proxy it.
|
||||
//
|
||||
// `dest` comes from the query string, so it is only followed when it is a
|
||||
// site-relative path — a leading "//" or a scheme would be an open redirect.
|
||||
|
||||
Reference in New Issue
Block a user