Merge pull request #138 from shokinn/master

Catch-all ("_") check for https redirect
This commit is contained in:
Grzegorz Dzien 2019-06-11 10:08:40 +01:00 committed by GitHub
commit 17ea0dea29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ server {
root {{ item.value.root }}; root {{ item.value.root }};
{% endif %} {% endif %}
{% if item.value.https_redirect is defined and item.value.https_redirect %} {% if item.value.https_redirect is defined and item.value.https_redirect %}
return 301 https://{{ item.value.server_name }}$request_uri; return 301 https://{% if item.value.server_name == "_" %}$host{% else %}{{ item.value.server_name }}{% endif %}$request_uri;
{% endif %} {% endif %}
{% if item.value.autoindex is defined and item.value.autoindex %} {% if item.value.autoindex is defined and item.value.autoindex %}
autoindex on; autoindex on;