Преглед на файлове

Merge pull request #572 from pvlg/patch-2

Replace "replace" to "trimSuffix"
Jason Wilder преди 8 години
родител
ревизия
760936d9ea
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      nginx.tmpl

+ 2 - 2
nginx.tmpl

@@ -118,8 +118,8 @@ upstream {{ $host }} {
 {{ $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 }}
+{{ $vhostCert := trimSuffix ".crt" $vhostCert }}
+{{ $vhostCert := trimSuffix ".key" $vhostCert }}
 
 {{/* Use the cert specified on the container or fallback to the best vhost match */}}
 {{ $cert := (coalesce $certName $vhostCert) }}