diff --git a/next.config.ts b/next.config.ts index 8275045..4904c87 100644 --- a/next.config.ts +++ b/next.config.ts @@ -3,12 +3,16 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { output: "standalone", images: { - remotePatterns: [ - { - protocol: "https", - hostname: "*" // Allow all domains - } - ] + remotePatterns: process.env.NODE_ENV === 'production' + ? [ + { protocol: "https", hostname: "*" }, + // Only specific trusted domains in production + // { protocol: "https", hostname: "yourdomain.com" } + ] + : [ + { protocol: "https", hostname: "*" }, + { protocol: "http", hostname: "*" } // Allow all in development + ] } }; diff --git a/src/components/organisms/status/Status.tsx b/src/components/organisms/status/Status.tsx index a55744e..9b78ea8 100644 --- a/src/components/organisms/status/Status.tsx +++ b/src/components/organisms/status/Status.tsx @@ -22,6 +22,7 @@ import LoadingSpinner from "@/components/molecules/common/LoadingSpinner"; import { useTipTapEditor } from "@/hooks/customs/useTipTapEditor"; import Image from "next/image"; import { MastodonCustomEmoji } from "../compose/tools/Emoji"; +import { FALLBACK_PREVIEW_IMAGE_URL } from "@/constants/url"; type StatusProps = { status: StatusType; @@ -195,16 +196,16 @@ const Status: React.FC = ({ >
avatar photo {status.reblog && (