nginx-proxy/vhost-template.conf: Set X-Forwarded-Host
authorW. Trevor King <wking@tremily.us>
Fri, 10 Jan 2014 03:42:38 +0000 (19:42 -0800)
committerW. Trevor King <wking@tremily.us>
Fri, 10 Jan 2014 03:42:38 +0000 (19:42 -0800)
commitcc2c4276b2f54d283e373c39cd7552f6210fea86
tree594e75268dbf7258cc041e01ef7cb4c7fd885656
parent2445bcfba3e2374eb8507f8d56db3ddd8e5ae212
nginx-proxy/vhost-template.conf: Set X-Forwarded-Host

Since v1.5, Django cares about the requested Host (or
X-Forwarded-Host) [1], so we need to pass that information through.
With this Nginx config, you can set USE_X_FORWARDED_HOST [2] and parse
the appropriate hostname instead of your Docker container's IP.

[1]: https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
[2]: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-USE_X_FORWARDED_HOST
nginx-proxy/vhost-template.conf