django4: replaced deprecated request.is_ajax() call (#68571)
This commit is contained in:
parent
366758a54d
commit
1740cd7483
|
@ -44,7 +44,7 @@ class PassiveAuthenticationMiddleware(MiddlewareMixin):
|
|||
if 'no-passive-auth' in request.GET:
|
||||
return
|
||||
# Skip AJAX requests
|
||||
if request.is_ajax():
|
||||
if request.headers.get('x-requested-with') == 'XMLHttpRequest':
|
||||
return
|
||||
# Skip AJAX and media/script requests, unless mellon_no_passive is False on the view
|
||||
if getattr(view_func, 'mellon_no_passive', True) and 'text/html' not in request.META.get(
|
||||
|
|
Loading…
Reference in New Issue