diff --git a/packages/backend/src/core/DownloadService.ts b/packages/backend/src/core/DownloadService.ts index 93f4a38246..6266e51496 100644 --- a/packages/backend/src/core/DownloadService.ts +++ b/packages/backend/src/core/DownloadService.ts @@ -61,7 +61,6 @@ export class DownloadService { request: operationTimeout, // whole operation timeout }, agent: { - http: this.httpRequestService.httpAgent, https: this.httpRequestService.httpsAgent, }, http2: false, // default diff --git a/packages/backend/src/server/web/UrlPreviewService.ts b/packages/backend/src/server/web/UrlPreviewService.ts index 5d493c2c46..94b4a9fd90 100644 --- a/packages/backend/src/server/web/UrlPreviewService.ts +++ b/packages/backend/src/server/web/UrlPreviewService.ts @@ -118,7 +118,6 @@ export class UrlPreviewService { private fetchSummary(url: string, meta: MiMeta, lang?: string): Promise { const agent = this.config.proxy ? { - http: this.httpRequestService.httpAgent, https: this.httpRequestService.httpsAgent, } : undefined; diff --git a/packages/sw/src/sw.ts b/packages/sw/src/sw.ts index 89754c976e..2ce0e9dab0 100644 --- a/packages/sw/src/sw.ts +++ b/packages/sw/src/sw.ts @@ -75,6 +75,12 @@ async function offlineContentHTML() { async function registerFetchHandler(root: FileSystemDirectoryHandle | null) { console.debug('rootfs:', root); + const state = await root?.getFileHandle('state.json', { create: true }) + await state?.createWritable().then(async writable => { + await writable.write(JSON.stringify({ started: Date.now() })); + await writable.close(); + }); + globalThis.addEventListener('fetch', ev => { const shouldCache = PATHS_TO_CACHE.some(path => ev.request.url.includes(path));