We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6181967 commit b9d062eCopy full SHA for b9d062e
src/sw.ts
@@ -562,6 +562,9 @@ async function errorPageResponse (fetchResponse: Response): Promise<Response> {
562
/**
563
* TODO: output configuration
564
*/
565
+ const mergedHeaders = new Headers(fetchResponse.headers)
566
+ mergedHeaders.set('Content-Type', 'text/html')
567
+
568
return new Response(`<!DOCTYPE html>
569
<html>
570
<head>
@@ -595,9 +598,7 @@ async function errorPageResponse (fetchResponse: Response): Promise<Response> {
595
598
</html>`, {
596
599
status: fetchResponse.status,
597
600
statusText: fetchResponse.statusText,
- headers: new Headers({
- 'Content-Type': 'text/html'
- })
601
+ headers: mergedHeaders
602
})
603
}
604
0 commit comments