docs(caddy): drop the misleading skip /openapi.json comment#273
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comment-only fix in
caddy/Caddyfile.The
encodeblock 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 bareencode gzipwith no path matcher, so/openapi.jsongets 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.jsonCPU 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 passingProudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/