fix for nil clientTLS causing issue
This commit is contained in:
parent
f0ea45a0f8
commit
0757a75732
2 changed files with 26 additions and 1 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"crypto/x509"
|
||||
"fmt"
|
||||
"github.com/BurntSushi/toml"
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/containous/traefik/autogen"
|
||||
"github.com/containous/traefik/safe"
|
||||
"github.com/containous/traefik/types"
|
||||
|
@ -109,6 +110,10 @@ type ClientTLS struct {
|
|||
// CreateTLSConfig creates a TLS config from ClientTLS structures
|
||||
func (clientTLS *ClientTLS) CreateTLSConfig() (*tls.Config, error) {
|
||||
var err error
|
||||
if clientTLS == nil {
|
||||
log.Warnf("clientTLS is nil")
|
||||
return nil, nil
|
||||
}
|
||||
caPool := x509.NewCertPool()
|
||||
if clientTLS.CA != "" {
|
||||
var ca []byte
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue