Display default TLS options in the dashboard

This commit is contained in:
Antoine 2022-09-09 12:46:09 +02:00 committed by GitHub
parent 77c8d60092
commit 44a2b85dba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 92 additions and 0 deletions

View file

@ -11,6 +11,7 @@ import (
"github.com/gorilla/mux"
"github.com/traefik/traefik/v2/pkg/config/runtime"
"github.com/traefik/traefik/v2/pkg/log"
"github.com/traefik/traefik/v2/pkg/tls"
)
type routerRepresentation struct {
@ -20,6 +21,10 @@ type routerRepresentation struct {
}
func newRouterRepresentation(name string, rt *runtime.RouterInfo) routerRepresentation {
if rt.TLS != nil && rt.TLS.Options == "" {
rt.TLS.Options = tls.DefaultTLSConfigName
}
return routerRepresentation{
RouterInfo: rt,
Name: name,