Add mirrorBody option to HTTP mirroring
This commit is contained in:
parent
51f7f610c9
commit
eb99c8c785
19 changed files with 165 additions and 22 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue