mirror of https://github.com/buster-so/buster.git
Update supabase server to secure and http only
This commit is contained in:
parent
15e515720f
commit
02d0f9f2c4
|
@ -1,4 +1,4 @@
|
||||||
import { createServerClient, type CookieOptions } from '@supabase/ssr';
|
import { createServerClient } from '@supabase/ssr';
|
||||||
import { cookies } from 'next/headers';
|
import { cookies } from 'next/headers';
|
||||||
|
|
||||||
export async function createClient() {
|
export async function createClient() {
|
||||||
|
@ -8,6 +8,14 @@ export async function createClient() {
|
||||||
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
||||||
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
||||||
{
|
{
|
||||||
|
cookieOptions: {
|
||||||
|
secure: true,
|
||||||
|
httpOnly: true
|
||||||
|
},
|
||||||
|
auth: {
|
||||||
|
autoRefreshToken: true,
|
||||||
|
persistSession: true
|
||||||
|
},
|
||||||
cookies: {
|
cookies: {
|
||||||
getAll() {
|
getAll() {
|
||||||
return cookieStore.getAll();
|
return cookieStore.getAll();
|
||||||
|
|
Loading…
Reference in New Issue