mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 15:46:39 +08:00
Little fix
This commit is contained in:
parent
1436e8df26
commit
bb1ed984d6
@ -102,17 +102,20 @@ const CorsHeaders = [
|
||||
const IndexHeaders = [
|
||||
{ key: "Cache-Control", value: "public, max-age=86400"}
|
||||
]
|
||||
const ForceCacheHeaders = [
|
||||
{ key: "Cache-Control", value: "max-age=2592000, s-maxage=86400"}
|
||||
]
|
||||
|
||||
if (mode !== "export") {
|
||||
nextConfig.headers = async () => {
|
||||
return [
|
||||
{
|
||||
source: "/api/:path*",
|
||||
headers: CorsHeaders,
|
||||
source: "/:path*\\.(png|ico|txt|css|js|json|webmanifest)",
|
||||
headers: ForceCacheHeaders,
|
||||
},
|
||||
// {
|
||||
// source: "/",
|
||||
// headers: IndexHeaders,
|
||||
// source: "/api/:path*",
|
||||
// headers: CorsHeaders,
|
||||
// },
|
||||
];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user