Fix error 500 on CAS logout page if no HTTP Referer is provided (#43221)

License: MIT
This commit is contained in:
Benjamin Renard 2021-04-15 14:24:54 +02:00 committed by Benjamin Dauvergne
parent ca068d35a5
commit 891599f1b7
1 changed files with 1 additions and 1 deletions

View File

@ -464,7 +464,7 @@ class LogoutView(View):
http_method_names = ['get']
def get(self, request):
referrer = request.META['HTTP_REFERER']
referrer = request.headers.get('Referer')
next_url = request.GET.get('service') or make_url('auth_homepage')
if referrer:
model = Service.objects.for_service(referrer)