mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 17:58:45 +02:00
feat(net): add option to disable compression
This commit is contained in:
@@ -55,6 +55,9 @@ func NewReverseProxyRoute(base *Route) (*ReveseProxyRoute, gperr.Error) {
|
|||||||
if httpConfig.ResponseHeaderTimeout > 0 {
|
if httpConfig.ResponseHeaderTimeout > 0 {
|
||||||
trans.ResponseHeaderTimeout = httpConfig.ResponseHeaderTimeout
|
trans.ResponseHeaderTimeout = httpConfig.ResponseHeaderTimeout
|
||||||
}
|
}
|
||||||
|
if httpConfig.DisableCompression {
|
||||||
|
trans.DisableCompression = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
service := base.Name()
|
service := base.Name()
|
||||||
|
|||||||
@@ -7,4 +7,5 @@ import (
|
|||||||
type HTTPConfig struct {
|
type HTTPConfig struct {
|
||||||
NoTLSVerify bool `json:"no_tls_verify,omitempty"`
|
NoTLSVerify bool `json:"no_tls_verify,omitempty"`
|
||||||
ResponseHeaderTimeout time.Duration `json:"response_header_timeout,omitempty"`
|
ResponseHeaderTimeout time.Duration `json:"response_header_timeout,omitempty"`
|
||||||
|
DisableCompression bool `json:"disable_compression,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user