I have a django 5.0 site deployed to elastic beanstalk with a domain and https through cloud front.
When i make POST requests without the CSRF_TRUSTED_ORIGINS setting set, i get 403 errors.
When i set the CSRF_TRUSTED_ORIGINS setting, i get 504 timeouts.
I have tried SSH’ing into the box and running the POST directly against the django site– it does the timeout there too. So it’s definitely not AWS. Something with django.
I’ve also tried downgrading to django 4– didn’t work either.
Everything works perfectly locally.
Any ideas?