[P1 PWA] Service worker cache-firsts every same-origin GET, including API and private responses #137
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-review
quasar
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/quasar-ui#137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
public/sw.jssends every non-navigation same-origin GET request throughcacheFirstAsset():cacheFirstAsset()then stores any successful response without checking route, content type, authorization, or cache policy:This is safe only for immutable application assets. In a deployment where StarIntel APIs, model endpoints, document exports, capability discovery, auth endpoints, or other data routes share the Quasar origin, the service worker can:
Browser HTTP cache directives do not automatically make arbitrary Cache Storage writes safe.
Required fix
Use an allowlist for immutable build assets and make all data/auth routes network-only.
Before storing, require a cacheable response:
Prefer a generated precache manifest containing exact hashed build artifacts. Versioned cache cleanup should delete only Quasar-owned cache names, not every other cache under the origin.
Acceptance criteria
Cache-Control: no-store/privateand credential-bearing responses are never stored.