Fix image host whitelist for next
This commit is contained in:
parent
50e9028250
commit
e59d2ef537
@ -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/**",
|
||||
},
|
||||
],
|
||||
|
Reference in New Issue
Block a user