From 1cd663cd68a5580840298221c62aa8ca1a431a6b Mon Sep 17 00:00:00 2001 From: Roni Choudhury Date: Thu, 25 Jan 2024 20:05:32 -0500 Subject: [PATCH] Add a setting to control WWW-Authenticate header behavior --- rest_framework/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rest_framework/settings.py b/rest_framework/settings.py index b0d7bacec..2a05e6879 100644 --- a/rest_framework/settings.py +++ b/rest_framework/settings.py @@ -78,6 +78,7 @@ DEFAULTS = { # Authentication 'UNAUTHENTICATED_USER': 'django.contrib.auth.models.AnonymousUser', 'UNAUTHENTICATED_TOKEN': None, + 'WWW_AUTHENTICATE_BEHAVIOR': 'first', # View configuration 'VIEW_NAME_FUNCTION': 'rest_framework.views.get_view_name',