🐛 fix: forward browser cookies to backend via nextjs proxy

This commit is contained in:
2026-02-10 23:37:03 +07:00
parent ef5f7ef2e0
commit 686d24084f

View File

@ -30,6 +30,7 @@ export const backendFetch = async (path: string, options: RequestInit = {}) => {
"Content-Type": "application/json", "Content-Type": "application/json",
"x-client-info": JSON.stringify(clientInfo), "x-client-info": JSON.stringify(clientInfo),
Authorization: `Bearer ${process.env.BACKEND_API_KEY}`, Authorization: `Bearer ${process.env.BACKEND_API_KEY}`,
cookie: (await headers()).get("cookie") || "",
...options.headers, ...options.headers,
}, },
cache: "default", cache: "default",