mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
middleware: Remove unused cookie_domain setting.
Since commit 1d72629dc4
, we have been
maintaining a patched copy of Django’s
SessionMiddleware.process_response in order to unconditionally ignore
our own optional cookie_domain setting that we don’t set.
Instead, let’s not do that.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
68257e28ce
commit
dce6b4a40f
@@ -165,7 +165,8 @@ MIDDLEWARE = (
|
||||
'zerver.middleware.RateLimitMiddleware',
|
||||
'zerver.middleware.FlushDisplayRecipientCache',
|
||||
'zerver.middleware.ZulipCommonMiddleware',
|
||||
'zerver.middleware.SessionHostDomainMiddleware',
|
||||
'zerver.middleware.HostDomainMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
@@ -387,11 +388,6 @@ if PRODUCTION:
|
||||
SESSION_COOKIE_SECURE = True
|
||||
CSRF_COOKIE_SECURE = True
|
||||
|
||||
# For get_updates hostname sharding.
|
||||
domain = get_config('django', 'cookie_domain', None)
|
||||
if domain is not None:
|
||||
CSRF_COOKIE_DOMAIN = '.' + domain
|
||||
|
||||
# Prevent Javascript from reading the CSRF token from cookies. Our code gets
|
||||
# the token from the DOM, which means malicious code could too. But hiding the
|
||||
# cookie will slow down some attackers.
|
||||
|
Reference in New Issue
Block a user