Commit ad9df1a
[Blazor] Fix PWA service worker to handle redirected cached responses (#64612)
* Initial plan
* Fix Blazor PWA service worker to handle redirected cached responses
Handle redirected responses in onFetch by creating a new Response object
without the redirected flag. This fixes issues with hosts like Cloudflare
Pages that redirect index.html requests.
Fixes #33872
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
* Clone response before extracting body for safer handling
Address code review feedback by cloning the cached response before
creating a new Response object, ensuring the body can be safely read.
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
* Apply suggestion from @javiercn
* Apply suggestion from @javiercn
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: javiercn <6995051+javiercn@users.noreply.github.com>
Co-authored-by: Javier Calvarro Nelson <jacalvar@microsoft.com>1 parent e150fbe commit ad9df1a
File tree
1 file changed
+9
-0
lines changed- src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/wwwroot
1 file changed
+9
-0
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
54 | 63 | | |
55 | 64 | | |
0 commit comments