diff --git a/configuration.go b/configuration.go index 64b5f7da3..406d0f88f 100644 --- a/configuration.go +++ b/configuration.go @@ -33,6 +33,7 @@ type GlobalConfiguration struct { DefaultEntryPoints DefaultEntryPoints `description:"Entrypoints to be used by frontends that do not specify any entrypoint"` ProvidersThrottleDuration time.Duration `description:"Backends throttle duration: minimum duration between 2 events from providers before applying a new configuration. It avoids unnecessary reloads if multiples events are sent in a short amount of time."` MaxIdleConnsPerHost int `description:"If non-zero, controls the maximum idle (keep-alive) to keep per-host. If zero, DefaultMaxIdleConnsPerHost is used"` + InsecureSkipVerify bool `description:"Disable SSL certificate verification"` Retry *Retry `description:"Enable retry sending request if network error"` Docker *provider.Docker `description:"Enable Docker backend"` File *provider.File `description:"Enable File backend"` diff --git a/traefik.go b/traefik.go index 8bc01e7bc..3228ae4e6 100644 --- a/traefik.go +++ b/traefik.go @@ -5,6 +5,7 @@ import ( "fmt" fmtlog "log" "net/http" + "crypto/tls" "os" "reflect" "runtime" @@ -173,6 +174,9 @@ func run(traefikConfiguration *TraefikConfiguration) { globalConfiguration := traefikConfiguration.GlobalConfiguration http.DefaultTransport.(*http.Transport).MaxIdleConnsPerHost = globalConfiguration.MaxIdleConnsPerHost + if globalConfiguration.InsecureSkipVerify { + http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true} + } loggerMiddleware := middlewares.NewLogger(globalConfiguration.AccessLogsFile) defer loggerMiddleware.Close()