Skip to content

Commit

Permalink
fix(gatsby-plugin-manifest): re-use domain connection (#26946)
Browse files Browse the repository at this point in the history
* fix(gatsby-plugin-manifest): re-use domain connection

* fix tests

Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
  • Loading branch information
wardpeet and gatsbybot committed Sep 27, 2020
1 parent 75b6f39 commit 6d0d2ef
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Expand Up @@ -23,6 +23,7 @@ Array [
exports[`gatsby-plugin-manifest CORS Generation Does not add crossOrigin when 'crossOrigin' is blank 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -42,6 +43,7 @@ Array [
type="image/png"
/>,
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand Down Expand Up @@ -101,6 +103,7 @@ Array [
type="image/png"
/>,
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand Down Expand Up @@ -160,6 +163,7 @@ Array [
type="image/png"
/>,
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand Down Expand Up @@ -219,6 +223,7 @@ Array [
type="image/png"
/>,
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand Down Expand Up @@ -268,6 +273,7 @@ Array [
exports[`gatsby-plugin-manifest Cache Busting doesn't add cache busting in manual mode 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand Down Expand Up @@ -297,6 +303,7 @@ Array [
type="image/png"
/>,
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -306,6 +313,7 @@ Array [
exports[`gatsby-plugin-manifest Favicon Does not add a link favicon if "include_favicon" option is set to false 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -315,6 +323,7 @@ Array [
exports[`gatsby-plugin-manifest Favicon Does not add a link favicon if in manual mode 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -324,6 +333,7 @@ Array [
exports[`gatsby-plugin-manifest Legacy Icons Does create legacy links if "legacy" not specified in automatic mode 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand Down Expand Up @@ -373,6 +383,7 @@ Array [
exports[`gatsby-plugin-manifest Legacy Icons Does create legacy links if "legacy" not specified in hybrid mode. 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -392,6 +403,7 @@ Array [
exports[`gatsby-plugin-manifest Legacy Icons Does create legacy links if "legacy" not specified in manual mode. 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -411,6 +423,7 @@ Array [
exports[`gatsby-plugin-manifest Legacy Icons Does not create legacy links If "legacy" options is false and in automatic 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -420,6 +433,7 @@ Array [
exports[`gatsby-plugin-manifest Legacy Icons Does not create legacy links If "legacy" options is false and in hybrid mode 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -429,6 +443,7 @@ Array [
exports[`gatsby-plugin-manifest Legacy Icons Does not create legacy links If "legacy" options is false and in manual mode 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -442,6 +457,7 @@ Array [
exports[`gatsby-plugin-manifest Manifest Link Generation Add a "theme color" meta tag if "theme_color_in_head" is set to true 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -465,6 +481,7 @@ Array [
type="image/png"
/>,
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand Down Expand Up @@ -518,6 +535,7 @@ Array [
exports[`gatsby-plugin-manifest Manifest Link Generation Adds a "theme color" meta tag to head if "theme_color_in_head" is not provided 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -531,6 +549,7 @@ Array [
exports[`gatsby-plugin-manifest Manifest Link Generation Adds correct (default) i18n "manifest" link to head 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand Down Expand Up @@ -580,6 +599,7 @@ Array [
exports[`gatsby-plugin-manifest Manifest Link Generation Adds correct (es) i18n "manifest" link to head 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest_es.webmanifest"
rel="manifest"
/>,
Expand Down Expand Up @@ -629,6 +649,7 @@ Array [
exports[`gatsby-plugin-manifest Manifest Link Generation Does not add a "theme color" meta tag if "theme_color_in_head" is set to false 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand All @@ -638,6 +659,7 @@ Array [
exports[`gatsby-plugin-manifest Manifest Link Generation Does not add a "theme_color" meta tag to head if "theme_color" option is not provided. 1`] = `
Array [
<link
crossOrigin="anonymous"
href="/manifest.webmanifest"
rel="manifest"
/>,
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-manifest/src/gatsby-ssr.js
Expand Up @@ -18,7 +18,7 @@ exports.onRenderBody = (
include_favicon: insertFaviconLinkTag,
theme_color_in_head: insertMetaTag,
theme_color,
crossOrigin,
crossOrigin = `anonymous`,
}
) => {
// We use this to build a final array to pass as the argument to setHeadComponents at the end of onRenderBody.
Expand Down

0 comments on commit 6d0d2ef

Please sign in to comment.