remove unneeded param

This commit is contained in:
Simon Knott 2024-10-15 15:19:52 +02:00
parent 8687e5505e
commit 82ad4ec110
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
2 changed files with 2 additions and 2 deletions

View file

@ -123,7 +123,7 @@ async function doFetch(event: FetchEvent): Promise<Response> {
const { snapshotServer } = loadedTraces.get(traceUrl!) || {};
if (!snapshotServer)
return new Response(null, { status: 404 });
const response = snapshotServer.serveSnapshot(relativePath, url.searchParams, url.href, self.registration.scope, traceUrl!);
const response = snapshotServer.serveSnapshot(relativePath, url.searchParams, url.href, self.registration.scope);
if (isDeployedAsHttps)
response.headers.set('Content-Security-Policy', 'upgrade-insecure-requests');
return response;

View file

@ -43,7 +43,7 @@ export class SnapshotServer {
this._pages = new Map(contextEntries.flatMap(c => c.pages.map(p => [p.pageId, p])));
}
serveSnapshot(pathname: string, searchParams: URLSearchParams, snapshotUrl: string, swScope: string, traceUrl: string): Response {
serveSnapshot(pathname: string, searchParams: URLSearchParams, snapshotUrl: string, swScope: string): Response {
const snapshot = this._snapshot(pathname.substring('/snapshot'.length), searchParams);
if (!snapshot)
return new Response(null, { status: 404 });