Skip to content

Commit 5cb522c

Browse files
CryptoJonesAaron K. Clarkclaude
authored
docs(caddy): drop the misleading "skip /openapi.json" comment (#273)
The Caddyfile's encode block had a comment claiming "Skip for /openapi.json since it's already small and aggressive compression on JSON adds a few ms" — but the actual directive is bare \`encode gzip\` with no path matcher, so /openapi.json gets gzipped along with everything else. The phantom skip has been there since the original TLS-reverse-proxy PR. Replace the misleading reasoning with an accurate note: we compress everything, the JSON-payload sizes here make that a clear win, and /openapi.json's CPU cost is negligible at the rate it's hit. Mention the historical inaccuracy so future readers don't re-derive the same false conclusion from a stale comment. Caddy config only; no test impact. 760 still passing. Co-authored-by: Aaron K. Clark <akclark@thenetwerk.net> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1534eba commit 5cb522c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

caddy/Caddyfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@
3535
header_up Host {host}
3636
}
3737

38-
# Compress responses. Skip for /openapi.json since it's already
39-
# small and aggressive compression on JSON adds a few ms.
38+
# Compress responses. Applies to everything Caddy serves — the
39+
# JSON payloads in this API are mostly small list bodies where
40+
# gzip's wins still beat the negligible CPU cost, and /openapi.json
41+
# is rare enough not to matter. (An earlier comment here implied
42+
# we skipped /openapi.json; the config never actually did that.)
4043
encode gzip
4144

4245
# Structured access logs to stdout in JSON. Matches the app's

0 commit comments

Comments
 (0)