feat(proxy): group name in smart origin dns name in nginx
This commit is contained in:
parent
42d6d0ee96
commit
710fe05983
1 changed files with 2 additions and 2 deletions
|
@ -116,7 +116,7 @@ class ProxyAutomation(TerraformAutomation):
|
|||
{% for origin in origins %}
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name origin-{{ origin.id }}.{{ smart_zone[:-1] }};
|
||||
server_name origin-{{ origin.id }}.{{ origin.group.group_name | lower }}.smart.{{ smart_zone[:-1] }};
|
||||
location / {
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_ssl_server_name on;
|
||||
|
@ -125,7 +125,7 @@ class ProxyAutomation(TerraformAutomation):
|
|||
subs_filter https://{{ origin.domain_name }}/ /;
|
||||
subs_filter "([^:]|)\\\"https://{{ origin.domain_name }}\\\"" \\1\\\"/\\\";
|
||||
{%- for asset_origin in origin.group.origins | selectattr("assets") -%}
|
||||
{%- for asset_proxy in asset_origin.proxies | selectattr("provider", "equalto", provider) | selectattr("deprecated", "none") | selectattr("destroyed", "none") -%}
|
||||
{%- for asset_proxy in asset_origin.proxies | selectattr("deprecated", "none") | selectattr("destroyed", "none") -%}
|
||||
{%- if loop.first %}
|
||||
subs_filter https://{{ asset_origin.domain_name }}/ {{ asset_proxy.url }}/;
|
||||
{%- endif -%}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue