mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 22:02:16 +00:00
With the service worker now registered for every user, the network-first page cache sees every authenticated navigation. The everyday app routes are client-fetch-only shells with no server-rendered PII, but the `/c/[token]` clinician-share view renders health values straight into the HTML and emits `no-store`. The page cache ignored the header and stored it, so a revoked or expired share could still render back offline. Gate `cache.put` in `networkFirst` on a new `isCacheableNavigation` check: skip any response carrying `Cache-Control: no-store` (the principled rule for any present or future server RSC that renders user data) and skip the `/c/*` path outright as belt-and-braces. Ordinary navigations still cache unchanged.