Skip to content

Commit

Permalink
Update response header in make_auth_required_response function
Browse files Browse the repository at this point in the history
Signed-off-by: cl3t4p <61201782+cl3t4p@users.noreply.github.com>
  • Loading branch information
cl3t4p committed Apr 3, 2024
1 parent 135a4dd commit 7a112d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask_simpleldap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def basic_auth_required(self, func):

def make_auth_required_response():
response = make_response("Unauthorized", 401)
response.www_authenticate.set_basic(current_app.config["LDAP_REALM_NAME"])
response.headers['WWW-Authenticate'] = f'Basic realm="{current_app.config["LDAP_REALM_NAME"]}"'
return response

@wraps(func)
Expand Down

0 comments on commit 7a112d8

Please sign in to comment.