Don't force redirect if unsecure_server is defined
This commit is contained in:
parent
2a388e7c48
commit
94adc23d07
@ -24,10 +24,12 @@ server {
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
server_name {{ domains | join(' ') }};
|
server_name {{ domains | join(' ') }};
|
||||||
|
|
||||||
|
{%+ if notls is not defined and unsecure_server is not defined %}
|
||||||
location / {
|
location / {
|
||||||
# enforce https
|
# enforce https
|
||||||
return 301 https://$server_name:443$request_uri;
|
return 301 https://$server_name:443$request_uri;
|
||||||
}
|
}
|
||||||
|
{% endif %}
|
||||||
{% if unsecure_server is defined -%}
|
{% if unsecure_server is defined -%}
|
||||||
{{ unsecure_server | indent(4) }}
|
{{ unsecure_server | indent(4) }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user