Files
xpack-mcp/frontend/next.config.js
T
2025-10-16 17:35:45 +08:00

56 lines
1.1 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
// Enable SSR
output: "standalone",
// Optimize images
images: {
domains: [],
unoptimized: false, // Enable image optimization for SSR
},
// Webpack configuration
webpack: (config) => {
return config;
},
// Redirect configuration
async redirects() {
return [];
},
// async rewrites() {
// return [
// {
// source: "/api/:path*",
// destination: `${process.env.NEXT_PUBLIC_API_URL || "http://127.0.0.1:8001"}/api/:path*`,
// },
// {
// source: "/uploads/:path*",
// destination: `${process.env.NEXT_PUBLIC_API_URL || "http://127.0.0.1:8001"}/uploads/:path*`,
// },
// ];
// },
// Headers for better performance
async headers() {
return [
{
source: "/(.*)",
headers: [
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "X-XSS-Protection",
value: "1; mode=block",
},
],
},
];
},
};
module.exports = nextConfig;