1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-02 06:45:45 +00:00

Add HTTPS_METHOD=https to disable SSL site

This commit is contained in:
Steve Kamerman
2016-10-01 11:22:48 -04:00
parent 0670a13d92
commit 374b1256cd
2 changed files with 28 additions and 6 deletions

View File

@ -125,7 +125,7 @@ upstream {{ $host }} {
{{/* Use the cert specified on the container or fallback to the best vhost match */}}
{{ $cert := (coalesce $certName $vhostCert) }}
{{ $is_https := (and (ne $cert "") (exists (printf "/etc/nginx/certs/%s.crt" $cert)) (exists (printf "/etc/nginx/certs/%s.key" $cert))) }}
{{ $is_https := (and (ne $https_method "nohttps") (ne $cert "") (exists (printf "/etc/nginx/certs/%s.crt" $cert)) (exists (printf "/etc/nginx/certs/%s.key" $cert))) }}
{{ if $is_https }}