diff --git a/smartsoltech/settings_test.py b/smartsoltech/settings_test.py index 9006ac6..a57f85b 100644 --- a/smartsoltech/settings_test.py +++ b/smartsoltech/settings_test.py @@ -113,4 +113,15 @@ if 'test' in sys.argv: # Отключаем сигналы для ускорения тестов if 'test' in sys.argv: from django.core.signals import setting_changed - setting_changed.disconnect() \ No newline at end of file + 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) \ No newline at end of file