Skip to content

Commit

Permalink
Ensure HEADER_USERNAME is set when using proxy auth
Browse files Browse the repository at this point in the history
  • Loading branch information
albinmedoc committed Dec 2, 2024
1 parent ef9ed50 commit f6bdcbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/login/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit f6bdcbb

Please sign in to comment.