Skip to content

Commit e0c6c49

Browse files
authored
refactor: simplify the remote patterns config (#8325)
1 parent 30d6c52 commit e0c6c49

File tree

1 file changed

+5
-30
lines changed

1 file changed

+5
-30
lines changed

apps/site/next.config.mjs

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,11 @@ const nextConfig = {
1919
// We add it to the remote pattern for the static images we use from multiple sources
2020
// to be marked as safe sources (these come from Markdown files)
2121
remotePatterns: [
22-
{
23-
protocol: 'https',
24-
hostname: 'avatars.githubusercontent.com',
25-
port: '',
26-
pathname: '/**',
27-
},
28-
{
29-
protocol: 'https',
30-
hostname: 'bestpractices.coreinfrastructure.org',
31-
port: '',
32-
pathname: '/**',
33-
},
34-
{
35-
protocol: 'https',
36-
hostname: 'raw.githubusercontent.com',
37-
port: '',
38-
pathname: '/nodejs/**',
39-
},
40-
{
41-
protocol: 'https',
42-
hostname: 'user-images.githubusercontent.com',
43-
port: '',
44-
pathname: '/**',
45-
},
46-
{
47-
protocol: 'https',
48-
hostname: 'website-assets.oramasearch.com',
49-
port: '',
50-
pathname: '/**',
51-
},
22+
new URL('https://avatars.githubusercontent.com/**'),
23+
new URL('https://bestpractices.coreinfrastructure.org/**'),
24+
new URL('https://raw.githubusercontent.com/nodejs/**'),
25+
new URL('https://user-images.githubusercontent.com/**'),
26+
new URL('https://website-assets.oramasearch.com/**'),
5227
],
5328
},
5429
serverExternalPackages: ['twoslash'],

0 commit comments

Comments
 (0)