mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-02-22 09:02:01 +00:00
fix: revert wut
This commit is contained in:
parent
cd86a7ad42
commit
ff70624283
@ -3,20 +3,20 @@ import type { Session } from "better-auth/types";
|
|||||||
import { type NextRequest, NextResponse } from "next/server";
|
import { type NextRequest, NextResponse } from "next/server";
|
||||||
|
|
||||||
export default async function authMiddleware(request: NextRequest) {
|
export default async function authMiddleware(request: NextRequest) {
|
||||||
// const { data: session } = await betterFetch<Session>(
|
const { data: session } = await betterFetch<Session>(
|
||||||
// "/api/auth/get-session",
|
"/api/auth/get-session",
|
||||||
// {
|
{
|
||||||
// baseURL: request.nextUrl.origin,
|
baseURL: request.nextUrl.origin,
|
||||||
// headers: {
|
headers: {
|
||||||
// //get the cookie from the request
|
//get the cookie from the request
|
||||||
// cookie: request.headers.get("cookie") || "",
|
cookie: request.headers.get("cookie") || "",
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// );
|
);
|
||||||
|
|
||||||
// if (!session) {
|
if (!session) {
|
||||||
// return NextResponse.redirect(new URL("/login", request.url));
|
return NextResponse.redirect(new URL("/login", request.url));
|
||||||
// }
|
}
|
||||||
return NextResponse.next();
|
return NextResponse.next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user