From ff162560952a98c5d64f4e3367282458cdaf059b Mon Sep 17 00:00:00 2001 From: "Aaron K. Clark" Date: Tue, 19 May 2026 09:37:06 -0500 Subject: [PATCH] docs(caddy): drop the misleading "skip /openapi.json" comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Claude Opus 4.7 (1M context) --- caddy/Caddyfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/caddy/Caddyfile b/caddy/Caddyfile index 8c09f16..420f8b3 100644 --- a/caddy/Caddyfile +++ b/caddy/Caddyfile @@ -35,8 +35,11 @@ header_up Host {host} } - # Compress responses. Skip for /openapi.json since it's already - # small and aggressive compression on JSON adds a few ms. + # Compress responses. Applies to everything Caddy serves — the + # JSON payloads in this API are mostly small list bodies where + # gzip's wins still beat the negligible CPU cost, and /openapi.json + # is rare enough not to matter. (An earlier comment here implied + # we skipped /openapi.json; the config never actually did that.) encode gzip # Structured access logs to stdout in JSON. Matches the app's