Implement newsletter double opt-in email flow and CSP nonce headers
This commit is contained in:
@@ -49,6 +49,7 @@ INSTALLED_APPS = [
|
||||
|
||||
MIDDLEWARE = [
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
"apps.core.middleware.SecurityHeadersMiddleware",
|
||||
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
@@ -130,6 +131,7 @@ CACHES = {
|
||||
X_FRAME_OPTIONS = "SAMEORIGIN"
|
||||
SECURE_REFERRER_POLICY = "strict-origin-when-cross-origin"
|
||||
SECURE_CONTENT_TYPE_NOSNIFF = True
|
||||
X_CONTENT_TYPE_OPTIONS = "nosniff"
|
||||
|
||||
CSRF_TRUSTED_ORIGINS = [u for u in os.getenv("CSRF_TRUSTED_ORIGINS", "http://localhost:8035").split(",") if u]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user