Skip to content

Commit

Permalink
Merge pull request #100 from cl3t4p/master
Browse files Browse the repository at this point in the history
Update response header in make_auth_required_response function
  • Loading branch information
alexferl authored Apr 3, 2024
2 parents f7d9fb7 + 7a112d8 commit ba8caa8
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 @@ -431,7 +431,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 ba8caa8

Please sign in to comment.