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