mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 17:44:57 +08:00
feat: #1000 ready to support client-side only
This commit is contained in:
@@ -15,6 +15,27 @@ const nextConfig = {
|
||||
};
|
||||
|
||||
if (mode !== "export") {
|
||||
nextConfig.headers = async () => {
|
||||
return [
|
||||
{
|
||||
source: "/:path*",
|
||||
headers: [
|
||||
{ key: "Access-Control-Allow-Credentials", value: "true" },
|
||||
{ key: "Access-Control-Allow-Origin", value: "*" },
|
||||
{
|
||||
key: "Access-Control-Allow-Methods",
|
||||
value: "GET,OPTIONS,PATCH,DELETE,POST,PUT",
|
||||
},
|
||||
{
|
||||
key: "Access-Control-Allow-Headers",
|
||||
value:
|
||||
"X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
nextConfig.rewrites = async () => {
|
||||
const ret = [
|
||||
{
|
||||
|
Reference in New Issue
Block a user