fixing middleware SSL issues
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ export async function middleware(request: NextRequest) {
|
|||||||
const isPublic = PUBLIC_PATHS.some((p) => pathname.startsWith(p))
|
const isPublic = PUBLIC_PATHS.some((p) => pathname.startsWith(p))
|
||||||
|
|
||||||
const { data: session } = await betterFetch<Session>('/api/auth/get-session', {
|
const { data: session } = await betterFetch<Session>('/api/auth/get-session', {
|
||||||
baseURL: request.nextUrl.origin,
|
baseURL: `http://localhost:${process.env.PORT ?? 3000}`,
|
||||||
headers: { cookie: request.headers.get('cookie') ?? '' },
|
headers: { cookie: request.headers.get('cookie') ?? '' },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user