Repository navigation
Conversation
* Name a Cache Lifetime on Every Response Ahead of an Edge Proxy A proxy that caches by file extension sits in front of neither site today, and nothing in the bundle says how long a copy may live, so a browser guesses from Last-Modified and an edge would apply its own defaults. Every blog response now carries a Cache-Control: pages and feeds revalidate on every use, the fingerprinted assets are immutable, and media is bounded to an hour so a replaced image propagates without a purge. Both error pages answer no-cache whatever path they stand in for, and the family pages state the same. The log review keeps the last element of ClientHost, since a proxied request carries the forwarded chain there and a client may prepend any value. The operations doc names the edge as a tier above Traefik and what it hides. Verified on the local staging mirror: the live check passes, and each class serves the header the deploy README's table states. * Scope the Lifetime Claims and Name Cloudflare Where the Edge Is Meant The first strict review pass found the deploy README claiming a lifetime on every blog response while the redirects carry none, the operations doc and the jq comment using the edge for Cloudflare where that section means Traefik, the forwarded-chain claim missing the trust condition it depends on, and null guards on a field Traefik always writes. * Shorten Two Cache Lifetime Sentences and Name the Family Matcher The second strict review pass found two sentences over the length rule and a claim that the family block has a default header where the catch-all matcher is what reaches its redirects. * Run the Baseline Cache Header Ahead of the Redirects Copilot found that the redirect handlers end the route before the baseline no-cache header ran, so a 301 carried no lifetime and a changed map target could outlive a deploy in a cache. The baseline now runs first and the file classes override it. Verified on the local staging mirror: the live check passes, a legacy media redirect and a feed redirect answer no-cache, and the media and error classes keep their headers. * Place the Media Lifetime Comment Above the Rule It Explains
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #494 +/- ##
=======================================
Coverage 49.70% 49.70%
=======================================
Files 10 10
Lines 3058 3058
=======================================
Hits 1520 1520
Misses 1538 1538
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔵 Needs a closer look
The Caddy image matcher may cache unintended paths, and the documentation contains two style nits.
No open issues 🎉
What changed in this PR
Promotes explicit cache lifetimes for Blog and family-site responses ahead of Cloudflare proxying, while making log analysis proxy-aware.
Changes:
- Adds cache-control policies for pages, assets, media, icons, redirects, and errors.
- Documents the Cloudflare edge tier and cache lifetime classes.
- Extracts the final client address from forwarded
ClientHostchains.
| File | Summary | Review findings |
|---|---|---|
OPERATIONS.md |
Documents the Cloudflare edge tier and client-address handling. | No findings. |
deploy/README.md |
Defines cache lifetime classes and their operational rationale. | Two documentation-style nits regarding hard-wrapped paragraphs. |
deploy/Caddyfile |
Applies cache headers across site, asset, media, redirect, and error responses. | One moderate finding: image matchers may apply the one-hour policy to unintended paths. |
checks/log-review.jq |
Normalizes forwarded client addresses by selecting the final address. | No findings. |
Review effort: Lite
|
Answering the review headline on 070b7ab. "The Caddy image matcher may cache unintended paths": not a finding. "Two documentation-style nits regarding hard-wrapped paragraphs": real. The fleet rule is one logical paragraph per line. #496 rewrites the "Cache lifetimes" section that way, and this promotion picks it up once #496 merges. The rest of |
…496) * Defeat the Edge Cache in the Media Check and Name the Zone Settings The live check asks for each media file with a per-run query, on the first request and on the legacy hop, so an edge copy cannot answer for a file a release lost. Page classes gain no-transform, which opts the bundle out of Cloudflare's content rewrites whatever the zone enables. deploy/README.md names the Browser Cache TTL and Caching Level the lifetimes depend on, and OPERATIONS.md corrects the robots.txt default and says client_ip is client-chosen behind Cloudflare. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Write the Cache Lifetimes Section One Paragraph per Line Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Serve the Blog's Error Page Precompressed and Name the Page Value Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Bust the Media Cache One Way and Qualify client_ip in the README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drop no-transform Until Its Effect on Compression Is Measured Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Use Reference Links in the Deploy README and Say no-cache Revalidates Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Answering the review headline on f35ec08, "Unresolved cache-matching and redirect query-handling issues". The round names no file, line, or finding, so this reads it against the head.
No change follows from the headline. #496, which this head carries, passed the full live check on the local staging mirror (1294 URLs), and its final content had a recorded local strict review pass with no findings. |
Summary
Promotes the Blog half of the Cloudflare proxy preparation that ptr727/HomeAutomation-Config#580 tracks.
Cache-Control. Pages, feeds, the sitemap,index.json,robots.txt, the redirects, and both error pages answerno-cache. The fingerprinted/assets/are immutable for a year, and/media/and the root icons get an hour.checks/log-review.jqreads the last element ofClientHost, which is the address the edge saw.OPERATIONS.mdanddeploy/README.mddescribe the edge tier and the lifetime classes.The Dependabot action bumps on develop already match main, so the tree diff is this one change. It adds comment lines to
deploy/Caddyfileandchecks/log-review.jq, so this PR carries thecommentslabel, as #492 did.The HomeAutomation-Config session reviewed #492 against Traefik, Caddy, and Cloudflare behavior and found it correct and safe to release. Its follow-ups, which must land before a release runs its gate against a proxied hostname, go in their own feature PR into develop.
Release
#492 changes
deploy/Caddyfile, so a release and deploy follow the merge. That covers the GitHub release, the VPS production deploy, and the local production mirror. The change passed the full live check on the local staging mirror (1294 URLs) three times, and three local strict review passes, the last clean.🤖 Generated with Claude Code