diff --git a/next.config.js b/next.config.js index b78ca75..c03ba7a 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,7 @@ /** @type {import('next').NextConfig} */ + +const imageUrlParts = process.env.NEXT_PUBLIC_SITE_URL.split("://"); + const nextConfig = { reactStrictMode: true, output: "standalone", @@ -10,11 +13,13 @@ const nextConfig = { { protocol: "http", hostname: "localhost", + port: "3000", pathname: "/api/files/**", }, { - protocol: "http", - hostname: process.env.NEXT_PUBLIC_SITE_URL, + protocol: imageUrlParts[0], + hostname: imageUrlParts[1].split(":")[0], + port: "443", pathname: "/api/files/**", }, ],