mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-01 01:22:34 +02:00
feat(net): add option to disable compression
This commit is contained in:
parent
2628d9e8a8
commit
717fd0e58c
2 changed files with 4 additions and 0 deletions
|
@ -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"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue