Skip to content

Commit ba8caa8

Browse files
authored
Merge pull request #100 from cl3t4p/master
Update response header in make_auth_required_response function
2 parents f7d9fb7 + 7a112d8 commit ba8caa8

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
@@ -431,7 +431,7 @@ def basic_auth_required(self, func):
431431

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

437437
@wraps(func)

0 commit comments

Comments
 (0)