Fix middleware for API auth
This commit is contained in:
@@ -6,7 +6,7 @@ const JWT_SECRET = new TextEncoder().encode(
|
|||||||
process.env.JWT_SECRET || "fallback-secret-change-in-production"
|
process.env.JWT_SECRET || "fallback-secret-change-in-production"
|
||||||
);
|
);
|
||||||
|
|
||||||
const publicPaths = ["/login", "/api/auth/login"];
|
const publicPaths = ["/login", "/api/auth"];
|
||||||
|
|
||||||
export async function middleware(request: NextRequest) {
|
export async function middleware(request: NextRequest) {
|
||||||
const { pathname } = request.nextUrl;
|
const { pathname } = request.nextUrl;
|
||||||
|
|||||||
Reference in New Issue
Block a user