From 7eeb44a1f543cc19209a2bda042b2fec30f74fb5 Mon Sep 17 00:00:00 2001 From: erjemin Date: Thu, 5 Mar 2026 14:02:59 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20canonical=20=D0=B2=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B4=D0=B0=D0=BA=D1=88=D0=B5=D0=BD=20=D0=BD=D0=B5=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=BB=D0=B6=D0=B5=D0=BD=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7?= =?UTF-8?q?=D1=8B=D0=B2=D0=B0=D1=82=D1=8C=20http=20=D0=B2=D0=BC=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D0=BE=20https?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dicquo/dicquo/settings.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dicquo/dicquo/settings.py b/dicquo/dicquo/settings.py index 4d234c9..b0dfe54 100644 --- a/dicquo/dicquo/settings.py +++ b/dicquo/dicquo/settings.py @@ -154,3 +154,12 @@ if not DEBUG: WHITENOISE_ROOT = BASE_DIR.parent / 'public' SITE_ID = 1 + +# Настройки безопасности для работы за прокси +if not DEBUG: + SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + SECURE_SSL_REDIRECT = True + SESSION_COOKIE_SECURE = True + CSRF_COOKIE_SECURE = True + USE_X_FORWARDED_HOST = True + USE_X_FORWARDED_PORT = True