mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 17:28:31 +02:00
http: increase default response header timeout to 60s, add option to customize it, schema update
This commit is contained in:
@@ -44,11 +44,15 @@ type (
|
||||
// var globalMux = http.NewServeMux() // TODO: support regex subdomain matching.
|
||||
|
||||
func NewHTTPRoute(entry *entry.ReverseProxyEntry) (impl, E.Error) {
|
||||
var trans *http.Transport
|
||||
if entry.Raw.NoTLSVerify {
|
||||
trans := gphttp.DefaultTransport
|
||||
httpConfig := entry.Raw.HTTPConfig
|
||||
|
||||
if httpConfig.NoTLSVerify {
|
||||
trans = gphttp.DefaultTransportNoTLS
|
||||
} else {
|
||||
trans = gphttp.DefaultTransport
|
||||
}
|
||||
if httpConfig.ResponseHeaderTimeout > 0 {
|
||||
trans = trans.Clone()
|
||||
trans.ResponseHeaderTimeout = httpConfig.ResponseHeaderTimeout
|
||||
}
|
||||
|
||||
service := entry.TargetName()
|
||||
|
||||
Reference in New Issue
Block a user