mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs(service-worker): add note regarding assets and CORS (#47262)
Fixes #41931 PR Close #47262
This commit is contained in:
committed by
Andrew Kushnir
parent
33bb34b64e
commit
d077d58139
@@ -90,6 +90,12 @@ Usually this is `/index.html`.
|
||||
They can include resources loaded from the page's origin as well as third-party resources loaded from CDNs and other external URLs.
|
||||
As not all such external URLs might be known at build time, URL patterns can be matched.
|
||||
|
||||
<div class="alert is-important">
|
||||
|
||||
For the service worker to handle resources that are loaded from different origins, make sure that [CORS][MozillaDeveloperDocsWebHttpCors] is correctly configured on each origin's server.
|
||||
|
||||
</div>
|
||||
|
||||
This field contains an array of asset groups, each of which defines a set of asset resources and the policy by which they are cached.
|
||||
|
||||
<code-example format="json" language="json">
|
||||
@@ -440,6 +446,8 @@ It is recommended that you use the default performance strategy whenever possibl
|
||||
|
||||
[WhatwgFetchSpecConceptFilteredResponseOpaque]: https://fetch.spec.whatwg.org#concept-filtered-response-opaque
|
||||
|
||||
[MozillaDeveloperDocsWebHttpCors]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
||||
|
||||
<!-- end links -->
|
||||
|
||||
@reviewed 2022-02-28
|
||||
|
||||
Reference in New Issue
Block a user