Skip to content

Commit

Permalink
fix for #264
Browse files Browse the repository at this point in the history
when a conditional is the last stament on the line, either make sure there's an extra new line or add some characters behind it.
"trim_blocks" is removing this new line otherwise (http://jinja.pocoo.org/docs/dev/api/#basics).
  • Loading branch information
AdSchellevis committed Jul 20, 2015
1 parent 953a546 commit a6f879f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/opnsense/service/templates/OPNsense/Proxy/squid.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
{% for intf_key,intf_item in interfaces.iteritems() %}
{% if intf_key == interface and intf_item.ipaddr != 'dhcp' %}
http_port {{intf_item.ipaddr}}:{{ OPNsense.proxy.forward.port }} {%if OPNsense.proxy.forward.transparentMode == '1' %}intercept{% endif %}

{% endif %}
{% endfor %}
{# virtual ip's #}
{% if helpers.exists('virtualip') %}
{% for intf_key,intf_item in virtualip.iteritems() %}
{% if intf_item.interface == interface and intf_item.mode == 'ipalias' %}
http_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.port }} {%if OPNsense.proxy.forward.transparentMode == '1' %}intercept{% endif %}

{% endif %}
{% endfor %}
{% endif %}
Expand All @@ -27,13 +29,15 @@ http_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.port }} {%if OPNsense.
{% for intf_key,intf_item in interfaces.iteritems() %}
{% if intf_key == interface and intf_item.ipaddr != 'dhcp' %}
ftp_port {{intf_item.ipaddr}}:{{ OPNsense.proxy.forward.ftpPort }} {%if OPNsense.proxy.forward.ftpTransparentMode == '1' %}intercept{% else %}accel ftp-track-dirs protocol=HTTP{% endif %}

{% endif %}
{% endfor %}
{# virtual ip's #}
{% if helpers.exists('virtualip') %}
{% for intf_key,intf_item in virtualip.iteritems() %}
{% if intf_item.interface == interface and intf_item.mode == 'ipalias' %}
ftp_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.ftpPort }} {%if OPNsense.proxy.forward.ftpTransparentMode == '1' %}intercept{% else %}accel ftp-track-dirs protocol=HTTP{% endif %}

{% endif %}
{% endfor %}
{% endif %}
Expand Down

0 comments on commit a6f879f

Please sign in to comment.