From 36d5cf0fec9faff9045a959767c5fc9ea61e13d4 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 4 Nov 2025 13:53:33 +0100 Subject: [PATCH] refactor: simplify the remote patterns config --- apps/site/next.config.mjs | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/apps/site/next.config.mjs b/apps/site/next.config.mjs index 7396448b79b18..f73ff9aceb00b 100644 --- a/apps/site/next.config.mjs +++ b/apps/site/next.config.mjs @@ -19,36 +19,11 @@ const nextConfig = { // We add it to the remote pattern for the static images we use from multiple sources // to be marked as safe sources (these come from Markdown files) remotePatterns: [ - { - protocol: 'https', - hostname: 'avatars.githubusercontent.com', - port: '', - pathname: '/**', - }, - { - protocol: 'https', - hostname: 'bestpractices.coreinfrastructure.org', - port: '', - pathname: '/**', - }, - { - protocol: 'https', - hostname: 'raw.githubusercontent.com', - port: '', - pathname: '/nodejs/**', - }, - { - protocol: 'https', - hostname: 'user-images.githubusercontent.com', - port: '', - pathname: '/**', - }, - { - protocol: 'https', - hostname: 'website-assets.oramasearch.com', - port: '', - pathname: '/**', - }, + new URL('https://avatars.githubusercontent.com/**'), + new URL('https://bestpractices.coreinfrastructure.org/**'), + new URL('https://raw.githubusercontent.com/nodejs/**'), + new URL('https://user-images.githubusercontent.com/**'), + new URL('https://website-assets.oramasearch.com/**'), ], }, serverExternalPackages: ['twoslash'],