🐛 fix: forward browser cookies to backend via nextjs proxy
This commit is contained in:
@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user