Skip to content

Commit

Permalink
Merge pull request #4 from hellofresh/hotfix/add-server-attribute
Browse files Browse the repository at this point in the history
Set proxy_pass with 'server' value if 'server' is set.
  • Loading branch information
mereba authored Oct 27, 2017
2 parents 82734db + 00848f6 commit 1a34bce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion templates/fragments.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
##{{ ansible_managed }}
{% for fragment in fragments['list'] %}
location {{ fragment.path }} {
proxy_pass http://{{fragment.proxy_pass}};
{% if( (fragment.server is defined) and (kubenv is defined) ) %}
proxy_pass http://{{ fragment.server }};
{% else %}
proxy_pass http://{{ fragment.proxy_pass }};
{% endif %}
{% set combined_config = fragments['common_config'] %}
{% set _ = combined_config.update(fragment) %}
{% for key, value in combined_config.iteritems() %}
Expand Down

0 comments on commit 1a34bce

Please sign in to comment.