mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-25 10:31:30 +01:00
fix(agent): respect response header timeout and compression settings
This commit is contained in:
@@ -30,6 +30,13 @@ func ProxyHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
transport := NewTransport()
|
||||
if cfg.ResponseHeaderTimeout > 0 {
|
||||
transport.ResponseHeaderTimeout = cfg.ResponseHeaderTimeout
|
||||
}
|
||||
if cfg.DisableCompression {
|
||||
transport.DisableCompression = true
|
||||
}
|
||||
|
||||
transport.TLSClientConfig, err = cfg.BuildTLSConfig(r.URL)
|
||||
if err != nil {
|
||||
http.Error(w, fmt.Sprintf("failed to build TLS client config: %s", err.Error()), http.StatusInternalServerError)
|
||||
|
||||
Reference in New Issue
Block a user