smart_proxy: asset domain configuration formatting

This commit is contained in:
Iain Learmonth 2022-05-25 15:57:00 +01:00
parent d99cf88f38
commit c916624414

View file

@ -175,13 +175,13 @@ class ProxyAutomation(TerraformAutomation):
subs_filter_types text/html text/css text/xml;
subs_filter https://{{ origin.domain_name }}/ /;
subs_filter "\\\"https://{{ origin.domain_name }}\\\"" /;
{% for asset_origin in origin.group.origins | selectattr("origin", "true") %}
{% for asset_proxy in asset_origin.proxies | selectattr("provider", provider) %}
{% if loop.first %}
{%- for asset_origin in origin.group.origins | selectattr("assets") -%}
{%- for asset_proxy in asset_origin.proxies | selectattr("provider", "equalto", provider) -%}
{%- if loop.first %}
subs_filter https://{{ asset_origin.domain_name }}/ {{ asset_proxy.url }}/
{% endif %}
{% endfor %}
{% endfor %}
{%- endif -%}
{%- endfor -%}
{%- endfor %}
}
ssl_certificate /etc/ssl/smart_proxy.crt;
ssl_certificate_key /etc/ssl/private/smart_proxy.key;