Skip to content

Commit

Permalink
fix(chttpd): Always show browser login popup
Browse files Browse the repository at this point in the history
Always show the browser login popup, no matter
which option of `require_valid_user` or
`require_valid_user_except_up` is set.
  • Loading branch information
big-r81 committed Dec 19, 2024
1 parent 0713b51 commit 8b88341
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/chttpd/src/chttpd.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1235,13 +1235,17 @@ error_headers(#httpd{mochi_req = MochiReq} = Req, 401 = Code, ErrorStr, ReasonSt
undefined ->
{Code, []};
AuthRedirect ->
case
RequireValidUser =
chttpd_util:get_chttpd_config_boolean(
"require_valid_user", false
)
of
) or
chttpd_util:get_chttpd_config_boolean(
"require_valid_user_except_for_up", false
),
case RequireValidUser of
true ->
% send the browser popup header no matter what if we are require_valid_user
% send the browser popup header no matter what
% if we are require_valid_user or require_valid_user_except_up
{Code, [{"WWW-Authenticate", "Basic realm=\"server\""}]};
false ->
case
Expand Down

0 comments on commit 8b88341

Please sign in to comment.