Add SECURE_PROXY_SSL_HEADER

This commit is contained in:
Nyymix 2025-07-10 09:44:25 +03:00
parent c5af0c6d80
commit 4a282ba7a8

View file

@ -9,7 +9,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = 'django-insecure-$m!a$rjih3i64n8&t3km0u--k0_ij5-a6t!(n_nbz1$)$%0lqn'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False
ALLOWED_HOSTS = []
@ -162,7 +162,9 @@ SESSION_COOKIE_SECURE = True
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
CSRF_COOKIE_SECURE = True
SECURE_SSL_REDIRECT = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# SECURE_SSL_REDIRECT = True
# Redis cache
CACHES = {