mirror of
https://github.com/alibaba/higress.git
synced 2026-05-27 06:07:27 +08:00
feat: add global-option setting in configmap (#699)
Signed-off-by: sjcsjc123 <1401189096@qq.com>
This commit is contained in:
@@ -34,14 +34,21 @@ const (
|
||||
type ItemEventHandler = func(name string)
|
||||
|
||||
type HigressConfig struct {
|
||||
Tracing *Tracing `json:"tracing,omitempty"`
|
||||
Gzip *Gzip `json:"gzip,omitempty"`
|
||||
Tracing *Tracing `json:"tracing,omitempty"`
|
||||
Gzip *Gzip `json:"gzip,omitempty"`
|
||||
Downstream *Downstream `json:"downstream,omitempty"`
|
||||
DisableXEnvoyHeaders bool `json:"disableXEnvoyHeaders,omitempty"`
|
||||
AddXRealIpHeader bool `json:"addXRealIpHeader,omitempty"`
|
||||
}
|
||||
|
||||
func NewDefaultHigressConfig() *HigressConfig {
|
||||
globalOption := NewDefaultGlobalOption()
|
||||
higressConfig := &HigressConfig{
|
||||
Tracing: NewDefaultTracing(),
|
||||
Gzip: NewDefaultGzip(),
|
||||
Tracing: NewDefaultTracing(),
|
||||
Gzip: NewDefaultGzip(),
|
||||
Downstream: globalOption.Downstream,
|
||||
DisableXEnvoyHeaders: globalOption.DisableXEnvoyHeaders,
|
||||
AddXRealIpHeader: globalOption.AddXRealIpHeader,
|
||||
}
|
||||
return higressConfig
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user