mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-29 07:21:16 -07:00
Fix: use strict bool check for auth
This commit is contained in:
+3
-1
@@ -1,7 +1,9 @@
|
||||
import { getToken } from "next-auth/jwt";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
const authEnabled = Boolean(process.env.HOMEPAGE_AUTH_ENABLED);
|
||||
import { isAuthEnabled } from "utils/env";
|
||||
|
||||
const authEnabled = isAuthEnabled();
|
||||
const authSecret = process.env.NEXTAUTH_SECRET || process.env.HOMEPAGE_AUTH_SECRET;
|
||||
|
||||
export async function middleware(req) {
|
||||
|
||||
Reference in New Issue
Block a user