Skip to content

Commit

Permalink
Add link header to preconnect to CDN (#1296)
Browse files Browse the repository at this point in the history
  • Loading branch information
bookernath committed Aug 19, 2024
1 parent 8e6253d commit fcd44bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-deers-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-core": patch
---

Add link header to preconnect to CDN
4 changes: 4 additions & 0 deletions core/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ const nextConfig = {
key: 'Content-Security-Policy',
value: cspHeader.replace(/\n/g, ''),
},
{
key: 'Link',
value: `<https://${process.env.BIGCOMMERCE_CDN_HOSTNAME ?? 'cdn11.bigcommerce.com'}>; rel=preconnect`,
},
],
},
];
Expand Down

0 comments on commit fcd44bb

Please sign in to comment.