Migrate Compress from bool to struct

This commit is contained in:
Jean-Baptiste Doumenjou 2018-08-02 17:14:03 +02:00 committed by Traefiker Bot
parent 43d22d7a2f
commit c159e316be
6 changed files with 19 additions and 12 deletions

View file

@ -17,11 +17,15 @@ type EntryPoint struct {
Auth *types.Auth `export:"true"`
WhitelistSourceRange []string // Deprecated
WhiteList *types.WhiteList `export:"true"`
Compress bool `export:"true"`
Compress *Compress `export:"true"`
ProxyProtocol *ProxyProtocol `export:"true"`
ForwardedHeaders *ForwardedHeaders `export:"true"`
}
// Compress contains compress configuration
type Compress struct {
}
// ProxyProtocol contains Proxy-Protocol configuration
type ProxyProtocol struct {
Insecure bool `export:"true"`
@ -69,7 +73,10 @@ func (ep *EntryPoints) Set(value string) error {
whiteListSourceRange = strings.Split(result["whitelistsourcerange"], ",")
}
compress := toBool(result, "compress")
var compress *Compress
if len(result["compress"]) > 0 {
compress = &Compress{}
}
configTLS, err := makeEntryPointTLS(result)
if err != nil {