🔧 CRITICAL: Force CSRF_TRUSTED_ORIGINS at end of settings
Some checks failed
continuous-integration/drone/push Build is failing

- Added final override of CSRF_TRUSTED_ORIGINS at end of file
- Django 4.0+ compliance with proper scheme formatting
- Added debug print to verify final values
- Should resolve persistent 4_0.E001 error in CI

Previous attempts failed because settings were being overridden
after our initial definition. This ensures final precedence.
This commit is contained in:
2025-11-25 07:55:24 +09:00
parent d1e0b0bba4
commit c0d890b4de

View File

@@ -114,3 +114,14 @@ if 'test' in sys.argv:
if 'test' in sys.argv: if 'test' in sys.argv:
from django.core.signals import setting_changed from django.core.signals import setting_changed
setting_changed.disconnect() setting_changed.disconnect()
# КРИТИЧЕСКИ ВАЖНО: Финальное переопределение CSRF_TRUSTED_ORIGINS
# Django 4.0+ требует схемы (http://, https://)
CSRF_TRUSTED_ORIGINS = [
'http://localhost',
'http://127.0.0.1',
'http://postgres',
'https://smartsoltech.kr'
]
print("🔒 ФИНАЛЬНАЯ проверка CSRF_TRUSTED_ORIGINS:", CSRF_TRUSTED_ORIGINS)