Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set multiple directives with the same name #28

Open
onsails opened this issue Feb 27, 2015 · 3 comments
Open

Ability to set multiple directives with the same name #28

onsails opened this issue Feb 27, 2015 · 3 comments

Comments

@onsails
Copy link

onsails commented Feb 27, 2015

This configuration ends up with one proxy_set_header directive.

      location2:
        name: /tc
        proxy_pass:          http://backend:8111/tc
        proxy_http_version:  1.1
        proxy_set_header:    X-Forwarded-For $remote_addr
        proxy_set_header:    Host $host
        proxy_set_header:    Upgrade $http_upgrade
        proxy_set_header:    Connection $connection_upgrade
@sascha-egerer
Copy link

I've got the same problem and using

location2
    proxy_set_header:
        - "foo"
        - "bar"

ends up in

proxy_set_header ['foo', 'bar']

@ericpaulbishop
Copy link

I created my own version of the nginx playbook based on this one, but with a large number of tweaks (ericpaulbishop/ansible-role-nginx-server), including a syntax to specify multiple directives like you want. Maybe this will help, or you could port this part of my playbook back to this one? The relevant template file you need to make this work is the templates/site.j2 file.

@pjan
Copy link
Contributor

pjan commented Jul 12, 2015

We happily accept upstream PRs that fix issues you guys are running into...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants