mirror of
https://github.com/paricafe/misskey.git
synced 2025-03-15 01:29:17 -05:00
add navigate in sw.ts
This commit is contained in:
parent
a2c066852f
commit
29886c0a82
1 changed files with 3 additions and 2 deletions
|
@ -51,9 +51,10 @@ globalThis.addEventListener('fetch', (event) => {
|
|||
|
||||
if (event.request.headers.get('sec-fetch-dest') === 'document' ||
|
||||
event.request.headers.get('accept')?.includes('/html') ||
|
||||
event.request.url.endsWith('/')) {
|
||||
event.request.url.endsWith('/') ||
|
||||
event.request.mode === 'navigate') { //navigate may cause offlineContentHTML doesn't work but doesn' matter
|
||||
isHTMLRequest = true;
|
||||
} //If offlineContentHTML() is not needed anymore, add navigate.
|
||||
}
|
||||
|
||||
if (isHTMLRequest) {
|
||||
event.respondWith(
|
||||
|
|
Loading…
Add table
Reference in a new issue