Postgres
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { auth } from '@/lib/auth'
|
||||
import { headers } from 'next/headers'
|
||||
import { auth, getSanitizedHeaders } from '@/lib/auth'
|
||||
import { redirect } from 'next/navigation'
|
||||
import Link from 'next/link'
|
||||
|
||||
@@ -8,7 +7,7 @@ export default async function SuperAdminLayout({
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
const session = await auth.api.getSession({ headers: await headers() })
|
||||
const session = await auth.api.getSession({ headers: await getSanitizedHeaders() })
|
||||
|
||||
if (!session?.user) {
|
||||
redirect('/login')
|
||||
|
||||
Reference in New Issue
Block a user