I'm serving my django app behind a reverse proxy
The internet -> Nginx -> Gunicorn socket -> Django app
In the nginx config:
upstream my_server {
server unix:/webapps/my_app/run/gunicorn.sock fail_timeout=0;
}
The SSL is set up with certbot at the nginx level.
request.build_absolute_uri
in views.py
generates http links. How can I force it to generate https links?
request.build_absolute_uri
sounds so strongly like it would solve this problem that it took me long to recognize it may not. – Caricature