fix: canonical в продакшен не должен показывать http вместо https
This commit is contained in:
@@ -140,3 +140,10 @@ MEDIA_URL = '/media/'
|
||||
# https://docs.djangoproject.com/en/6.0/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
# Настройки безопасности для работы за прокси
|
||||
if not DEBUG:
|
||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||
SECURE_SSL_REDIRECT = True
|
||||
SESSION_COOKIE_SECURE = True
|
||||
CSRF_COOKIE_SECURE = True
|
||||
|
||||
Reference in New Issue
Block a user