proxy/azure_cdn: HACK! chain the cloudfront smart proxy where needed

This commit is contained in:
Iain Learmonth 2022-05-25 10:07:13 +01:00
parent dc0bfc8cb5
commit 5b503da621

View file

@ -123,12 +123,21 @@ class ProxyAzureCdnAutomation(ProxyAutomation):
location = "{{ azure_location }}"
resource_group_name = data.azurerm_resource_group.this.name
{% if proxy.smart %}
origin_host_header = "origin-{{ proxy.origin.id }}.cloudfront.smart.{{ smart_zone[:-1] }}"
origin {
name = "upstream"
host_name = "origin-{{ proxy.origin.id }}.cloudfront.smart.{{ smart_zone[:-1] }}"
}
{% else %}
origin_host_header = "{{ proxy.origin.domain_name }}"
origin {
name = "upstream"
host_name = "{{ proxy.origin.domain_name }}"
}
{% endif %}
global_delivery_rule {
modify_request_header_action {