Skip to content

Commit 6d0d2ef

Browse files
wardpeetgatsbybot
and
gatsbybot
authored
fix(gatsby-plugin-manifest): re-use domain connection (#26946)
* fix(gatsby-plugin-manifest): re-use domain connection * fix tests Co-authored-by: gatsbybot <[email protected]>
1 parent 75b6f39 commit 6d0d2ef

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

packages/gatsby-plugin-manifest/src/__tests__/__snapshots__/gatsby-ssr.js.snap

+22
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Array [
2323
exports[`gatsby-plugin-manifest CORS Generation Does not add crossOrigin when 'crossOrigin' is blank 1`] = `
2424
Array [
2525
<link
26+
crossOrigin="anonymous"
2627
href="/manifest.webmanifest"
2728
rel="manifest"
2829
/>,
@@ -42,6 +43,7 @@ Array [
4243
type="image/png"
4344
/>,
4445
<link
46+
crossOrigin="anonymous"
4547
href="/manifest.webmanifest"
4648
rel="manifest"
4749
/>,
@@ -101,6 +103,7 @@ Array [
101103
type="image/png"
102104
/>,
103105
<link
106+
crossOrigin="anonymous"
104107
href="/manifest.webmanifest"
105108
rel="manifest"
106109
/>,
@@ -160,6 +163,7 @@ Array [
160163
type="image/png"
161164
/>,
162165
<link
166+
crossOrigin="anonymous"
163167
href="/manifest.webmanifest"
164168
rel="manifest"
165169
/>,
@@ -219,6 +223,7 @@ Array [
219223
type="image/png"
220224
/>,
221225
<link
226+
crossOrigin="anonymous"
222227
href="/manifest.webmanifest"
223228
rel="manifest"
224229
/>,
@@ -268,6 +273,7 @@ Array [
268273
exports[`gatsby-plugin-manifest Cache Busting doesn't add cache busting in manual mode 1`] = `
269274
Array [
270275
<link
276+
crossOrigin="anonymous"
271277
href="/manifest.webmanifest"
272278
rel="manifest"
273279
/>,
@@ -297,6 +303,7 @@ Array [
297303
type="image/png"
298304
/>,
299305
<link
306+
crossOrigin="anonymous"
300307
href="/manifest.webmanifest"
301308
rel="manifest"
302309
/>,
@@ -306,6 +313,7 @@ Array [
306313
exports[`gatsby-plugin-manifest Favicon Does not add a link favicon if "include_favicon" option is set to false 1`] = `
307314
Array [
308315
<link
316+
crossOrigin="anonymous"
309317
href="/manifest.webmanifest"
310318
rel="manifest"
311319
/>,
@@ -315,6 +323,7 @@ Array [
315323
exports[`gatsby-plugin-manifest Favicon Does not add a link favicon if in manual mode 1`] = `
316324
Array [
317325
<link
326+
crossOrigin="anonymous"
318327
href="/manifest.webmanifest"
319328
rel="manifest"
320329
/>,
@@ -324,6 +333,7 @@ Array [
324333
exports[`gatsby-plugin-manifest Legacy Icons Does create legacy links if "legacy" not specified in automatic mode 1`] = `
325334
Array [
326335
<link
336+
crossOrigin="anonymous"
327337
href="/manifest.webmanifest"
328338
rel="manifest"
329339
/>,
@@ -373,6 +383,7 @@ Array [
373383
exports[`gatsby-plugin-manifest Legacy Icons Does create legacy links if "legacy" not specified in hybrid mode. 1`] = `
374384
Array [
375385
<link
386+
crossOrigin="anonymous"
376387
href="/manifest.webmanifest"
377388
rel="manifest"
378389
/>,
@@ -392,6 +403,7 @@ Array [
392403
exports[`gatsby-plugin-manifest Legacy Icons Does create legacy links if "legacy" not specified in manual mode. 1`] = `
393404
Array [
394405
<link
406+
crossOrigin="anonymous"
395407
href="/manifest.webmanifest"
396408
rel="manifest"
397409
/>,
@@ -411,6 +423,7 @@ Array [
411423
exports[`gatsby-plugin-manifest Legacy Icons Does not create legacy links If "legacy" options is false and in automatic 1`] = `
412424
Array [
413425
<link
426+
crossOrigin="anonymous"
414427
href="/manifest.webmanifest"
415428
rel="manifest"
416429
/>,
@@ -420,6 +433,7 @@ Array [
420433
exports[`gatsby-plugin-manifest Legacy Icons Does not create legacy links If "legacy" options is false and in hybrid mode 1`] = `
421434
Array [
422435
<link
436+
crossOrigin="anonymous"
423437
href="/manifest.webmanifest"
424438
rel="manifest"
425439
/>,
@@ -429,6 +443,7 @@ Array [
429443
exports[`gatsby-plugin-manifest Legacy Icons Does not create legacy links If "legacy" options is false and in manual mode 1`] = `
430444
Array [
431445
<link
446+
crossOrigin="anonymous"
432447
href="/manifest.webmanifest"
433448
rel="manifest"
434449
/>,
@@ -442,6 +457,7 @@ Array [
442457
exports[`gatsby-plugin-manifest Manifest Link Generation Add a "theme color" meta tag if "theme_color_in_head" is set to true 1`] = `
443458
Array [
444459
<link
460+
crossOrigin="anonymous"
445461
href="/manifest.webmanifest"
446462
rel="manifest"
447463
/>,
@@ -465,6 +481,7 @@ Array [
465481
type="image/png"
466482
/>,
467483
<link
484+
crossOrigin="anonymous"
468485
href="/manifest.webmanifest"
469486
rel="manifest"
470487
/>,
@@ -518,6 +535,7 @@ Array [
518535
exports[`gatsby-plugin-manifest Manifest Link Generation Adds a "theme color" meta tag to head if "theme_color_in_head" is not provided 1`] = `
519536
Array [
520537
<link
538+
crossOrigin="anonymous"
521539
href="/manifest.webmanifest"
522540
rel="manifest"
523541
/>,
@@ -531,6 +549,7 @@ Array [
531549
exports[`gatsby-plugin-manifest Manifest Link Generation Adds correct (default) i18n "manifest" link to head 1`] = `
532550
Array [
533551
<link
552+
crossOrigin="anonymous"
534553
href="/manifest.webmanifest"
535554
rel="manifest"
536555
/>,
@@ -580,6 +599,7 @@ Array [
580599
exports[`gatsby-plugin-manifest Manifest Link Generation Adds correct (es) i18n "manifest" link to head 1`] = `
581600
Array [
582601
<link
602+
crossOrigin="anonymous"
583603
href="/manifest_es.webmanifest"
584604
rel="manifest"
585605
/>,
@@ -629,6 +649,7 @@ Array [
629649
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`] = `
630650
Array [
631651
<link
652+
crossOrigin="anonymous"
632653
href="/manifest.webmanifest"
633654
rel="manifest"
634655
/>,
@@ -638,6 +659,7 @@ Array [
638659
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`] = `
639660
Array [
640661
<link
662+
crossOrigin="anonymous"
641663
href="/manifest.webmanifest"
642664
rel="manifest"
643665
/>,

packages/gatsby-plugin-manifest/src/gatsby-ssr.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ exports.onRenderBody = (
1818
include_favicon: insertFaviconLinkTag,
1919
theme_color_in_head: insertMetaTag,
2020
theme_color,
21-
crossOrigin,
21+
crossOrigin = `anonymous`,
2222
}
2323
) => {
2424
// We use this to build a final array to pass as the argument to setHeadComponents at the end of onRenderBody.

0 commit comments

Comments
 (0)