mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Previously, when requesting non-cached asset resources from the network,
the ServiceWorker would strip off all request metadata (including
headers). This was done in order to avoid issues with opaque responses,
but it turned out to be overly aggressive, breaking/worsening legit
usecases (such as requesting compressed data).
This commit fixes this by preserving the headers of such requests.
For reference, Workbox passes the original request as is. (See for
example the [NetworkFirst][1] strategy).
> **Note**
> Data requests (i.e. requests for URLs that belong to a data-group) are
not affected by this. They already use the original resource as is.
[1]:
|
||
|---|---|---|
| .. | ||
| BUILD.bazel | ||
| cache.ts | ||
| clients.ts | ||
| events.ts | ||
| fetch.ts | ||
| mock.ts | ||
| scope.ts | ||
| utils.ts | ||