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

Fix #28. Allow directives with the same name. #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Couto
Copy link

@Couto Couto commented Oct 1, 2015

It's the first time that I use the Jinja2 template system, so I'm not really sure about the correctness of this fix.

I wanted to reuse multiple directives with the same name, much like specified in #28
e.g.:

- server:
  listen: '[::]:443 ssl'
  listen: '443 ssl'
  location1: 
    name: /
    proxy_set_header: X-Real-IP $remote_addr
    proxy_set_header: Upgrade $http_upgrade
    proxy_set_header: Connection $connection_upgrade

However this doesn't work.

With this PR (that might need testing by someone with more experience than me) the following should work:

- server:
  listen:
    - '[::]:443 ssl'
    - '443 ssl'
  location1: 
    name: /
    proxy_set_header: 
      - 'X-Real-IP $remote_addr'
      - 'Upgrade $http_upgrade'
      - 'Connection $connection_upgrade'

@otakup0pe
Copy link
Member

I've run into this problem as well. Will take a look at your PR but conceptually I think this looks fine to me :)

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

Successfully merging this pull request may close these issues.

2 participants