Skip to content

docs(caddy): drop the misleading skip /openapi.json comment#273

Merged
CryptoJones merged 1 commit into
masterfrom
docs/caddyfile-fix-encode-comment
May 19, 2026
Merged

docs(caddy): drop the misleading skip /openapi.json comment#273
CryptoJones merged 1 commit into
masterfrom
docs/caddyfile-fix-encode-comment

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

Summary

Comment-only fix in caddy/Caddyfile.

The encode block claimed "Skip for /openapi.json since it's already small and aggressive compression on JSON adds a few ms" — but the actual directive is a 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.

What changed

Replaced the misleading reasoning with an accurate note: we compress everything, the JSON payload sizes make that a clear win, and /openapi.json CPU cost is negligible at the rate it's hit. Mentioned the historical inaccuracy so a future reader doesn't re-derive the same false conclusion from a stale comment.

Test plan

  • npm run lint && npm test — 760 passing
  • Caddy config only; no app behavior change.

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

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) <noreply@anthropic.com>
@CryptoJones CryptoJones merged commit 5cb522c into master May 19, 2026
3 checks passed
@CryptoJones CryptoJones deleted the docs/caddyfile-fix-encode-comment branch May 19, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant