USER - Navigate directly to a non-root path should show app
navigating directly to an app page now gets 404 from server.
Before the serviceworker (if already active in browser) would catch "any" landing url and redirect to cached /index.html
to be managed by app, eventually showing the corresponding page, or a "not found" app page
unifying server and client domains raised 314, fixed by removing /index.html
fallback from serviceworker config
now, navigating directly to a non-root path shows a server's 404
this scenario is highlighting that this issue can't be managed at serviceworker level because, as pointed out, it could be possible only if SW is already active in browser (i.e. user already visited rootpath of domain in past)
So, a user visiting a domain for the first time landing on a non-root-path url would have no active serviceworker for that domain, causing the webserver responding 404 anyhow
so, for the current architecture, I think this must be fixed managing requests at webserver level redirecting any request to /index.html
, except those pointing to server-reserved-paths ( e.g. /uploads/.*
, /api/.*
)