proxy: ensure use of only active proxies for smart proxy
This commit is contained in:
parent
b0fe83b984
commit
8c411e39bc
1 changed files with 2 additions and 3 deletions
|
@ -20,7 +20,6 @@ def update_smart_proxy_instance(group_id: int,
|
|||
provider: str,
|
||||
region: str,
|
||||
instance_id: str) -> None:
|
||||
print("SMART PROXY")
|
||||
instance = SmartProxy.query.filter(
|
||||
SmartProxy.group_id == group_id,
|
||||
SmartProxy.region == region,
|
||||
|
@ -176,9 +175,9 @@ class ProxyAutomation(TerraformAutomation):
|
|||
subs_filter https://{{ origin.domain_name }}/ /;
|
||||
subs_filter "\\\"https://{{ origin.domain_name }}\\\"" /;
|
||||
{%- for asset_origin in origin.group.origins | selectattr("assets") -%}
|
||||
{%- for asset_proxy in asset_origin.proxies | selectattr("provider", "equalto", provider) -%}
|
||||
{%- for asset_proxy in asset_origin.proxies | selectattr("provider", "equalto", provider) | selectattr("deprecated", "none") | selectattr("destroyed", "none") -%}
|
||||
{%- if loop.first %}
|
||||
subs_filter https://{{ asset_origin.domain_name }}/ {{ asset_proxy.url }}/
|
||||
subs_filter https://{{ asset_origin.domain_name }}/ {{ asset_proxy.url }}/;
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endfor %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue