image_generation / next.config.ts
ChenyuRabbitLove's picture
chore: update Next.js configuration for image domains, adjust API fetch URLs, and add health check endpoint in backend
17e5473
raw
history blame contribute delete
886 Bytes
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
output: "standalone",
images: {
domains: ['localhost', '127.0.0.1'],
remotePatterns: [
{
protocol: 'http',
hostname: 'localhost',
port: '8000',
pathname: '/api/v1/images/download/**',
},
{
protocol: 'http',
hostname: '127.0.0.1',
port: '8000',
pathname: '/api/v1/images/download/**',
},
{
protocol: 'http',
hostname: '*',
pathname: '/api/v1/images/download/**',
},
],
},
rewrites: async () => {
return [
{
source: "/api/:path*",
destination:
process.env.NODE_ENV === "development"
? "http://localhost:8000/api/:path*"
: "http://localhost:8000/api/:path*",
},
];
},
};
export default nextConfig;