[Blazor] Fetch logic should check if the asset is present in the list of included assets before deciding to serve index.html #40678
Labels
area-blazor
Includes: Blazor, Razor Components
blazor-wasm
This issue is related to and / or impacts Blazor WebAssembly
feature-pwa
Issues related to building PWAs with Blazor
good first issue
Good for newcomers.
help wanted
Up for grabs. We would accept a PR to help resolve this issue
Milestone
aspnetcore/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/wwwroot/service-worker.published.js
Lines 41 to 59 in 2b4a186
This causes issues when users try to access a resource on the page directly through the address bar.
The proposal involves updating the service worker to make sure that if a request is for an offline resource, we never serve index.html
Something like
The text was updated successfully, but these errors were encountered: