فهرست منبع

Merge pull request #482 from jwilder/jw-revert

Revert 9c93efa
Jason Wilder 9 سال پیش
والد
کامیت
db3ef67a7f
1فایلهای تغییر یافته به همراه4 افزوده شده و 6 حذف شده
  1. 4 6
      nginx.tmpl

+ 4 - 6
nginx.tmpl

@@ -112,13 +112,11 @@ upstream {{ $host }} {
 {{ $certName := (first (groupByKeys $containers "Env.CERT_NAME")) }}
 
 {{/* Get the best matching cert  by name for the vhost. */}}
-{{ $vhostCert := "" }}
-{{ if exists "/etc/nginx/certs" }}
 {{ $vhostCert := (closest (dir "/etc/nginx/certs") (printf "%s.crt" $host))}}
-	{{/* vhostCert is actually a filename so remove any suffixes since they are added later */}}
-	{{ $vhostCert := replace $vhostCert ".crt" "" -1 }}
-	{{ $vhostCert := replace $vhostCert ".key" "" -1 }}
-{{ end }}
+
+{{/* vhostCert is actually a filename so remove any suffixes since they are added later */}}
+{{ $vhostCert := replace $vhostCert ".crt" "" -1 }}
+{{ $vhostCert := replace $vhostCert ".key" "" -1 }}
 
 {{/* Use the cert specified on the container or fallback to the best vhost match */}}
 {{ $cert := (coalesce $certName $vhostCert) }}