Skip to content

Commit

Permalink
Merge pull request #829 from jcmoraisjr/jm-dyn-crt
Browse files Browse the repository at this point in the history
Fix dynamic update of frontend crt
  • Loading branch information
jcmoraisjr authored Aug 8, 2021
2 parents a4620e7 + 4ab3905 commit 7793f81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/haproxy/types/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (h *Host) AddRedirect(path string, match MatchType, redirTo string) {

type hostResolver struct {
useDefaultCrt *bool
crtHash *string
crtFilename *string
}

func (h *Host) addPath(path string, match MatchType, backend *Backend, redirTo string) {
Expand All @@ -247,7 +247,7 @@ func (h *Host) addPath(path string, match MatchType, backend *Backend, redirTo s
bpath := backend.AddBackendPath(link)
bpath.Host = &hostResolver{
useDefaultCrt: &h.TLS.UseDefaultCrt,
crtHash: &h.TLS.TLSHash,
crtFilename: &h.TLS.TLSFilename,
}
} else if redirTo == "" {
hback = HostBackend{ID: "_error404"}
Expand Down Expand Up @@ -293,7 +293,7 @@ func (h *Host) HasTLS() bool {
}

func (h *hostResolver) HasTLS() bool {
return *h.useDefaultCrt || *h.crtHash != ""
return *h.useDefaultCrt || *h.crtFilename != ""
}

// HasTLSAuth ...
Expand Down

0 comments on commit 7793f81

Please sign in to comment.