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