mirror of
https://github.com/traefik/traefik
synced 2026-02-03 11:10:33 +00:00
Add mirrorBody option to HTTP mirroring
This commit is contained in:
@@ -81,6 +81,7 @@ type RouterTLSConfig struct {
|
||||
// Mirroring holds the Mirroring configuration.
|
||||
type Mirroring struct {
|
||||
Service string `json:"service,omitempty" toml:"service,omitempty" yaml:"service,omitempty" export:"true"`
|
||||
MirrorBody *bool `json:"mirrorBody,omitempty" toml:"mirrorBody,omitempty" yaml:"mirrorBody,omitempty" export:"true"`
|
||||
MaxBodySize *int64 `json:"maxBodySize,omitempty" toml:"maxBodySize,omitempty" yaml:"maxBodySize,omitempty" export:"true"`
|
||||
Mirrors []MirrorService `json:"mirrors,omitempty" toml:"mirrors,omitempty" yaml:"mirrors,omitempty" export:"true"`
|
||||
HealthCheck *HealthCheck `json:"healthCheck,omitempty" toml:"healthCheck,omitempty" yaml:"healthCheck,omitempty" label:"allowEmpty" file:"allowEmpty" kv:"allowEmpty" export:"true"`
|
||||
@@ -88,6 +89,8 @@ type Mirroring struct {
|
||||
|
||||
// SetDefaults Default values for a WRRService.
|
||||
func (m *Mirroring) SetDefaults() {
|
||||
defaultMirrorBody := true
|
||||
m.MirrorBody = &defaultMirrorBody
|
||||
var defaultMaxBodySize int64 = -1
|
||||
m.MaxBodySize = &defaultMaxBodySize
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user