fix: static file /deploy/* (#5725)

This commit is contained in:
Finley Ge
2025-09-29 12:13:38 +08:00
committed by GitHub
parent d6fc27a892
commit bea5fc0b41
2 changed files with 15 additions and 1 deletions

View File

@@ -4,5 +4,6 @@ import { i18n } from '@/lib/i18n';
export default createI18nMiddleware(i18n);
export const config = {
matcher: ['/((?!api|_next/static|_next/image|favicon.ico|.*\\.svg|.*\\.png).*)']
// matcher: ['/((?!api|_next/static|_next/image|favicon.ico|.*\\.svg|.*\\.png).*)']
matcher: ['/((?!api|_next/static|_next/image|favicon.ico|.*\\.svg|.*\\.png|deploy/.*).*)']
};

View File

@@ -15,6 +15,19 @@ const config = {
output: 'standalone',
reactStrictMode: true,
compress: true,
async headers() {
return [
{
source: '/deploy/:path*',
headers: [
{
key: 'Content-Type',
value: 'text/plain; charset=utf-8',
},
],
},
];
},
images: {
unoptimized: true,
dangerouslyAllowSVG: true,