tethysplatform / tethys

The Tethys Platform main Django website project repository.
http://tethysplatform.org/
BSD 2-Clause "Simplified" License
94 stars 51 forks source link

[BUG] Add CSRF_TRUSTED_ORIGINS setting for production deployment #1035

Closed sdc50 closed 4 months ago

sdc50 commented 7 months ago

https://stackoverflow.com/questions/38841109/csrf-validation-does-not-work-on-django-using-https

sdc50 commented 4 months ago

While we may be able to add logic that takes the ALLOWED_HOSTS and prepends the scheme (if it's Django > 3) and determine if the scheme should be http or https, but I think for now the best approach is the most simple - just provide a variable that the user needs to set on the Docker.