From 163ae0f5c4fa0cedc0cdfc178c0e7278051a3a34 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Sat, 1 Nov 2025 23:14:12 +0800 Subject: [PATCH] fix(next): disable trailingSlash to restore API route matching for /api/auth/* --- dashboard/next.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard/next.config.js b/dashboard/next.config.js index 187db11..e490140 100644 --- a/dashboard/next.config.js +++ b/dashboard/next.config.js @@ -48,7 +48,7 @@ const shouldUseStaticExport = process.env.NEXT_SHOULD_EXPORT === 'true' /** @type {import('next').NextConfig} */ const nextConfig = { ...(shouldUseStaticExport ? { output: 'export' } : {}), - trailingSlash: true, + trailingSlash: false, reactStrictMode: true, compress: false, // 压缩交给 Nginx,省 Node CPU images: { unoptimized: true }, // 关闭服务端图片处理