Repository navigation
Discard Caddy's own diagnostics in front of the relay - #80
Conversation
Caddy's global log on the relay host went to a rotating file at ERROR level with no filter. A proxy error there names the request URI, which carries the rendezvous handle, beside the client address. Go's "TLS handshake error from <address>" puts the address in the message text, where a field filter cannot reach it. Discard that log, as the escrow already does. The site access log stays: its filter already deletes the URI, the headers and both address fields. A new test holds both rules and fails against the old file. The cost is no Caddy log when a certificate stops renewing; an outside check of /healthz covers that. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ftw-webapp | 7cc2f0e | Commit Preview URL Branch Preview URL |
Oct 12 2026, 05:16 PM |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7cc2f0e49f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # are discarded, which is a shape rather than a list of fields. | ||
| # | ||
| # What that costs: no Caddy log to read when a certificate stops renewing. | ||
| # `curl -sI https://relay.ftw.energy/healthz` from outside covers it end |
There was a problem hiding this comment.
Use GET for the external health check
When an operator adopts this command as the replacement for the discarded diagnostics, it never receives the health endpoint's successful response: curl --manual documents that HTTP -I uses HEAD, while RelayServer.start() accepts /healthz only when req.method === 'GET' and otherwise returns 426. This can produce a permanent false failure in monitoring; use the GET command already documented in relay/deploy/README.md or add HEAD handling to the endpoint.
Useful? React with 👍 / 👎.
Problem
Caddy's global log on the relay host goes to
/var/log/caddy/caddy.logat ERROR level with no filter (relay/deploy/Caddyfile). Two kinds of record end up there:The iOS App Store work (srcfl/ftw-app#13) found this while it filled in the App Privacy answers. With this log, the honest answer would have to declare "Other Diagnostic Data". Fredrik chose to remove the addresses instead.
Change
logblock now usesoutput discard, asescrow/deploy/Caddyfilealready does and for the same reason. A filter only covers the fields somebody thought of.request>uri,request>headers,request>remote_ipandrequest>client_ip.relay/deploy/caddyfile.test.tsis new and holds both rules:Cost: there is no Caddy log to read when a certificate stops renewing. An outside
curl -sI https://relay.ftw.energy/healthzcovers that.Evidence
discards Caddy's own diagnostics) and passes against the new one.npm run verify: 105 files passed and 1 skipped; 1062 tests passed and 1 skipped; svelte-check reports 0 errors; the build passed.After merge (operator, on the relay host)
docker compose exec caddy caddy validate --config /etc/caddy/Caddyfile.docker compose exec caddy sh -c 'rm -f /var/log/caddy/caddy.log*'.curl -sI https://relay.ftw.energy/healthz.🤖 Generated with Claude Code