remove unneeded param
This commit is contained in:
parent
8687e5505e
commit
82ad4ec110
|
|
@ -123,7 +123,7 @@ async function doFetch(event: FetchEvent): Promise<Response> {
|
||||||
const { snapshotServer } = loadedTraces.get(traceUrl!) || {};
|
const { snapshotServer } = loadedTraces.get(traceUrl!) || {};
|
||||||
if (!snapshotServer)
|
if (!snapshotServer)
|
||||||
return new Response(null, { status: 404 });
|
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)
|
if (isDeployedAsHttps)
|
||||||
response.headers.set('Content-Security-Policy', 'upgrade-insecure-requests');
|
response.headers.set('Content-Security-Policy', 'upgrade-insecure-requests');
|
||||||
return response;
|
return response;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ export class SnapshotServer {
|
||||||
this._pages = new Map(contextEntries.flatMap(c => c.pages.map(p => [p.pageId, p])));
|
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);
|
const snapshot = this._snapshot(pathname.substring('/snapshot'.length), searchParams);
|
||||||
if (!snapshot)
|
if (!snapshot)
|
||||||
return new Response(null, { status: 404 });
|
return new Response(null, { status: 404 });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue