Logout POST was failing CSRF Origin checks on HTTPS because CSRF_TRUSTED_ORIGINS was unset (Django 5)
Derive trusted origins from DJANGO_ALLOWED_HOSTS (override via DJANGO_CSRF_TRUSTED_ORIGINS)
Trust reverse-proxy TLS headers in prod/beta (SECURE_PROXY_SSL_HEADER, secure cookies)
Test plan
python manage.py test public.tests.CsrfTrustedOriginsTests public.tests.LogoutCsrfTests
Deploy, log in on aimloperations.com, click Log Out → redirect home, no 403
Confirm login still works after deploy
## Summary
- Closes #18
- Logout POST was failing CSRF Origin checks on HTTPS because `CSRF_TRUSTED_ORIGINS` was unset (Django 5)
- Derive trusted origins from `DJANGO_ALLOWED_HOSTS` (override via `DJANGO_CSRF_TRUSTED_ORIGINS`)
- Trust reverse-proxy TLS headers in prod/beta (`SECURE_PROXY_SSL_HEADER`, secure cookies)
## Test plan
- [x] `python manage.py test public.tests.CsrfTrustedOriginsTests public.tests.LogoutCsrfTests`
- [ ] Deploy, log in on aimloperations.com, click Log Out → redirect home, no 403
- [ ] Confirm login still works after deploy
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
CSRF_TRUSTED_ORIGINSwas unset (Django 5)DJANGO_ALLOWED_HOSTS(override viaDJANGO_CSRF_TRUSTED_ORIGINS)SECURE_PROXY_SSL_HEADER, secure cookies)Test plan
python manage.py test public.tests.CsrfTrustedOriginsTests public.tests.LogoutCsrfTests