Files
gitlab-instance-0a899031_na…/next.config.js
2025-12-07 10:28:11 +08:00

53 lines
1.0 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
// Docker 部署支持
// output: 'standalone',
images: {
domains: [
"dash.cloudflare.com",
"www.google.com",
"ph-static.imgix.net",
"app.leonardo.ai",
],
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
},
async rewrites() {
return [
{
source: "/api/auth/:path*",
destination: "/api/auth/:path*",
},
{
source: "/auth/:path*",
destination: "/auth/:path*",
},
];
},
// Cloudflare Pages configuration
experimental: {
serverActions: {
allowedOrigins: ["localhost", "navsphere.com", "*.hackrobot.cn"],
},
},
// 加在这句话就够了
generateBuildId: async () => {
return "v" + new Date().getTime();
},
headers: async () => [
{
source: "/:path*",
headers: [
{ key: "Cache-Control", value: "no-cache, no-store, must-revalidate" },
],
},
],
};
module.exports = nextConfig;