diff --git a/src/middleware.ts b/src/middleware.ts index ce8588e..e793937 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -3,7 +3,7 @@ import { lucia } from "./lib/auth"; import { verifyRequestOrigin as verifyOrig } from "lucia"; // import { defineMiddleware } from "astro:middleware"; -export const onRequest (context, next) { +export const onRequest = async (context, next) => { const path = new URL(context.request.url).pathname; // Skip middleware for non-admin paths if (!path.startsWith('/admin')) return next();