feat(service-worker): support bypassing SW with specific header/query param (#30010)
Add support for bypassing the ServiceWorker for a request by using the ngsw-bypass header or query parameter. Fixes #21191 PR Close #30010
This commit is contained in:

committed by
Andrew Kushnir

parent
304a12f027
commit
6200732e23
@ -61,21 +61,21 @@ export class MockHeaders implements Headers {
|
||||
|
||||
[Symbol.iterator]() { return this.map[Symbol.iterator](); }
|
||||
|
||||
append(name: string, value: string): void { this.map.set(name, value); }
|
||||
append(name: string, value: string): void { this.map.set(name.toLowerCase(), value); }
|
||||
|
||||
delete (name: string): void { this.map.delete(name); }
|
||||
delete (name: string): void { this.map.delete(name.toLowerCase()); }
|
||||
|
||||
entries() { return this.map.entries(); }
|
||||
|
||||
forEach(callback: Function): void { this.map.forEach(callback as any); }
|
||||
|
||||
get(name: string): string|null { return this.map.get(name) || null; }
|
||||
get(name: string): string|null { return this.map.get(name.toLowerCase()) || null; }
|
||||
|
||||
has(name: string): boolean { return this.map.has(name); }
|
||||
has(name: string): boolean { return this.map.has(name.toLowerCase()); }
|
||||
|
||||
keys() { return this.map.keys(); }
|
||||
|
||||
set(name: string, value: string): void { this.map.set(name, value); }
|
||||
set(name: string, value: string): void { this.map.set(name.toLowerCase(), value); }
|
||||
|
||||
values() { return this.map.values(); }
|
||||
}
|
||||
|
Reference in New Issue
Block a user