Skip to content

[FEATURE_REQUEST] Service worker cache prevents Cloudflare Zero Trust (and other auth proxies) from redirecting on session expiry #2189

@jordantrizz

Description

@jordantrizz

Is your feature request related to a problem? If so, please describe.

When Dashy is deployed behind an authentication proxy such as Cloudflare Zero Trust, Authelia, or similar, the registered service worker aggressively caches index.html and other assets. When the auth session expires, the proxy attempts to redirect the browser to the login portal — but the service worker intercepts the navigation and serves the cached page instead, resulting in a broken/errored Dashy instance with no way to re-authenticate without manually clearing the browser cache or unregistering the service worker via DevTools.

Describe the solution you'd like

On application load, perform a lightweight probe fetch against /conf.yml (or another known local endpoint) with cache: 'no-store' to verify the auth session is still valid. If the response is not ok, is redirected, or returns an opaque response (status 0), this indicates the auth proxy has intercepted the request. In that case, automatically unregister the service worker and trigger a page reload, allowing the proxy's redirect to the login portal to proceed normally.
This could also be exposed as an opt-in config option in conf.yml such as enableAuthProxyCompat: true for users who don't want to fully disable the service worker via the existing enableServiceWorker: false flag.

Priority

Low (Nice-to-have)

Is this something you would be keen to implement

Sure, but it would be vide coded.

Metadata

Metadata

Assignees

Labels

✅ Fixed[ISSUE] Auto-Assigned to Tickets whose fix has been deployed🛩️ Released 4.2.5Included in release v4.2.5🦄 Feature Request[ISSUE] Suggestion for new feature, update or change

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions