I've an app running on gunicorn / django (with django-rest-framework) behind nginx and I've a little problem with the url return by the rest framework when using the hyperlinkedmodelserializer
. They always return something like http://127.0.0.1/
instead of my host name.
Could you help please ?
Never mind, I've found I've forgot to put
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
in my nginx config. Works fine now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With