diff --git a/src/routes/login/+page.server.ts b/src/routes/login/+page.server.ts index 8c6b34e..f4c8f22 100644 --- a/src/routes/login/+page.server.ts +++ b/src/routes/login/+page.server.ts @@ -22,7 +22,7 @@ export const load: PageServerLoad = async ({ locals, request, cookies }) => { } /* Header authentication */ - if ((env.HEADER_AUTH_ENABLED ?? "false") == "true") { + if ((env.HEADER_AUTH_ENABLED ?? "false") == "true" && !!env.HEADER_USERNAME) { const username = request.headers.get(env.HEADER_USERNAME); if (username) { let user = await client.user.findUnique({