views: when deleting cookie conserve status of http_only flag

This commit is contained in:
Benjamin Dauvergne 2014-04-11 07:44:04 +02:00
parent 975bfd89f1
commit 6716551565
1 changed files with 2 additions and 1 deletions

View File

@ -36,5 +36,6 @@ def logout(request):
next_url = urlparse.urljoin(settings.STATIC_URL, 'authentic2/images/ok.png')
response = HttpResponseRedirect(next_url)
domain = app_settings.COOKIE_DOMAIN or request.META['HTTP_HOST'].split(':')[0]
response.delete_cookie(app_settings.COOKIE_NAME, domain=domain)
response.delete_cookie(app_settings.COOKIE_NAME, domain=domain,
httponly=app_settings.COOKIE_HTTP_ONLY)
return response