Example is the proxy_set_header that should allows us to adds multiple headers to requests. This fails due to the nature of YML — when specifying multiple keys the last entry simply overrides it.
Example in YML:
nginx_sites:
- server:
file_name: app
listen: 80
server_name: 'ubuntu1204'
location1:
name: '/'
proxy_pass: 'http://0.0.0.0:8080'
proxy_redirect: "off"
proxy_buffering: "off"
proxy_set_header: 'Host $host'
proxy_set_header: 'X-Real-IP $remote_addr'
proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
Resulting configuration output:
location / {
proxy_buffering off;
proxy_pass http://0.0.0.0:8080;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
}
See also: http://wiki.nginx.org/HttpProxyModule