Skip to content

Commit 7a112d8

Browse files
committed
Update response header in make_auth_required_response function
Signed-off-by: cl3t4p <[email protected]>
1 parent 135a4dd commit 7a112d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_simpleldap/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def basic_auth_required(self, func):
421421

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

427427
@wraps(func)

0 commit comments

Comments
 (0)