Skip to content

Commit 581022e

Browse files
author
jin
committed
$mol_offline: SOOP/SOEP
1 parent cc6ff64 commit 581022e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

offline/offline.web.ts

+11
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ namespace $ {
4949

5050
const fetch_data = () => fetch( request ).then( response => {
5151
if (response.status !== 200) return response
52+
53+
const headers = new Headers( response.headers )
54+
headers.set( "Cross-Origin-Embedder-Policy", "credentialless" )
55+
headers.set( "Cross-Origin-Opener-Policy", "same-origin" )
56+
57+
response = new Response( response.body, {
58+
status: response.status,
59+
statusText: response.statusText,
60+
headers,
61+
});
62+
5263
event.waitUntil(
5364
caches.open( '$mol_offline' ).then(
5465
cache => cache.put( request , response )

0 commit comments

Comments
 (0)