1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2024-12-26 04:26:31 +00:00

Merge pull request #572 from pvlg/patch-2

Replace "replace" to "trimSuffix"
This commit is contained in:
Jason Wilder 2016-09-17 09:58:27 -06:00 committed by GitHub
commit 760936d9ea

View File

@ -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) }}