From d077d581398e25001c3a76338fcdac629bc4be14 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Thu, 25 Aug 2022 21:40:22 +0300 Subject: [PATCH] docs(service-worker): add note regarding assets and CORS (#47262) Fixes #41931 PR Close #47262 --- aio/content/guide/service-worker-config.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aio/content/guide/service-worker-config.md b/aio/content/guide/service-worker-config.md index e2aebfe8d56..ed33174d6de 100644 --- a/aio/content/guide/service-worker-config.md +++ b/aio/content/guide/service-worker-config.md @@ -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. +
+ + 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. + +
+ 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. @@ -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 + @reviewed 2022-02-28