Ignore default location when defined in advanced config (#79)

This commit is contained in:
jc21
2019-02-25 10:34:55 +10:00
committed by GitHub
parent 26064b20b8
commit 29bebcc73e
5 changed files with 31 additions and 3 deletions

View File

@@ -10,10 +10,13 @@ server {
{{ advanced_config }}
{% if use_default_location %}
location / {
{% include "_forced_ssl.conf" %}
{% include "_hsts.conf" %}
return 404;
}
{% endif %}
}
{% endif %}

View File

@@ -16,6 +16,7 @@ server {
{{ advanced_config }}
{% if use_default_location %}
location / {
{%- if access_list_id > 0 -%}
# Access List
@@ -35,5 +36,7 @@ server {
# Proxy!
include conf.d/include/proxy.conf;
}
{% endif %}
}
{% endif %}

View File

@@ -12,6 +12,7 @@ server {
{{ advanced_config }}
{% if use_default_location %}
location / {
{% include "_forced_ssl.conf" %}
{% include "_hsts.conf" %}
@@ -22,5 +23,7 @@ server {
return 301 $scheme://{{ forward_domain_name }};
{% endif %}
}
{% endif %}
}
{% endif %}