mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix: don't let other poeple look at our cookies
This commit is contained in:
@@ -38,7 +38,12 @@ export async function updateSession(request: NextRequest) {
|
||||
request,
|
||||
});
|
||||
cookiesToSet.forEach(({ name, value, options }) =>
|
||||
supabaseResponse.cookies.set(name, value, options),
|
||||
supabaseResponse.cookies.set(name, value, {
|
||||
...options,
|
||||
httpOnly: true,
|
||||
secure: process.env.NODE_ENV === "production",
|
||||
sameSite: "lax",
|
||||
}),
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -18,7 +18,12 @@ export async function getServerSupabase() {
|
||||
setAll(cookiesToSet) {
|
||||
try {
|
||||
cookiesToSet.forEach(({ name, value, options }) =>
|
||||
cookieStore.set(name, value, options),
|
||||
cookieStore.set(name, value, {
|
||||
...options,
|
||||
httpOnly: true,
|
||||
secure: process.env.NODE_ENV === "production",
|
||||
sameSite: "lax",
|
||||
}),
|
||||
);
|
||||
} catch {
|
||||
// The `setAll` method was called from a Server Component.
|
||||
|
||||
Reference in New Issue
Block a user