From 28bd5bb8edf5667d1ffe4f32e2092f43cc1da317 Mon Sep 17 00:00:00 2001 From: eric Date: Sun, 7 Dec 2025 10:28:11 +0800 Subject: [PATCH] 's' --- next.config.js | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/next.config.js b/next.config.js index 21b0a35..b9fc559 100644 --- a/next.config.js +++ b/next.config.js @@ -2,39 +2,51 @@ const nextConfig = { // Docker 部署支持 // output: 'standalone', - + images: { domains: [ - 'dash.cloudflare.com', - 'www.google.com', - 'ph-static.imgix.net', - 'app.leonardo.ai' + "dash.cloudflare.com", + "www.google.com", + "ph-static.imgix.net", + "app.leonardo.ai", ], remotePatterns: [ { - protocol: 'https', - hostname: '**', + protocol: "https", + hostname: "**", }, ], }, async rewrites() { return [ { - source: '/api/auth/:path*', - destination: '/api/auth/:path*' + source: "/api/auth/:path*", + destination: "/api/auth/:path*", }, { - source: '/auth/:path*', - destination: '/auth/:path*' - } - ] + source: "/auth/:path*", + destination: "/auth/:path*", + }, + ]; }, // Cloudflare Pages configuration experimental: { serverActions: { - allowedOrigins: ['localhost', 'navsphere.com','*.hackrobot.cn'] - } - } -} + 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 +module.exports = nextConfig;