|
@@ -28,6 +28,7 @@
|
|
{{- $_ := set $config "enable_debug_endpoint" ($globals.Env.DEBUG_ENDPOINT | default "false") }}
|
|
{{- $_ := set $config "enable_debug_endpoint" ($globals.Env.DEBUG_ENDPOINT | default "false") }}
|
|
{{- $_ := set $config "hsts" ($globals.Env.HSTS | default "max-age=31536000") }}
|
|
{{- $_ := set $config "hsts" ($globals.Env.HSTS | default "max-age=31536000") }}
|
|
{{- $_ := set $config "acme_http_challenge" ($globals.Env.ACME_HTTP_CHALLENGE_LOCATION | default "true") }}
|
|
{{- $_ := set $config "acme_http_challenge" ($globals.Env.ACME_HTTP_CHALLENGE_LOCATION | default "true") }}
|
|
|
|
+{{- $_ := set $config "acme_http_challenge_accept_unknown_host" ($globals.Env.ACME_HTTP_CHALLENGE_ACCEPT_UNKNOWN_HOST | default "false" | parseBool) }}
|
|
{{- $_ := set $config "enable_http2" ($globals.Env.ENABLE_HTTP2 | default "true") }}
|
|
{{- $_ := set $config "enable_http2" ($globals.Env.ENABLE_HTTP2 | default "true") }}
|
|
{{- $_ := set $config "enable_http3" ($globals.Env.ENABLE_HTTP3 | default "false") }}
|
|
{{- $_ := set $config "enable_http3" ($globals.Env.ENABLE_HTTP3 | default "false") }}
|
|
{{- $_ := set $config "enable_http_on_missing_cert" ($globals.Env.ENABLE_HTTP_ON_MISSING_CERT | default "true") }}
|
|
{{- $_ := set $config "enable_http_on_missing_cert" ($globals.Env.ENABLE_HTTP_ON_MISSING_CERT | default "true") }}
|
|
@@ -861,6 +862,16 @@ server {
|
|
ssl_reject_handshake on;
|
|
ssl_reject_handshake on;
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
|
|
|
|
+ {{- if $globals.config.acme_http_challenge_accept_unknown_host }}
|
|
|
|
+ location ^~ /.well-known/acme-challenge/ {
|
|
|
|
+ auth_basic off;
|
|
|
|
+ allow all;
|
|
|
|
+ root /usr/share/nginx/html;
|
|
|
|
+ try_files $uri =404;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ {{- end }}
|
|
|
|
+
|
|
{{- if (exists "/usr/share/nginx/html/errors/50x.html") }}
|
|
{{- if (exists "/usr/share/nginx/html/errors/50x.html") }}
|
|
error_page 500 502 503 504 /50x.html;
|
|
error_page 500 502 503 504 /50x.html;
|
|
location /50x.html {
|
|
location /50x.html {
|