mirror of
https://github.com/caddyserver/caddy.git
synced 2025-03-09 07:29:03 -04:00
exported, but not serialized
This commit is contained in:
parent
01831049a3
commit
d6d9e9e8c8
@ -133,7 +133,7 @@ type ActiveHealthChecks struct {
|
|||||||
// body of a healthy backend.
|
// body of a healthy backend.
|
||||||
ExpectBody string `json:"expect_body,omitempty"`
|
ExpectBody string `json:"expect_body,omitempty"`
|
||||||
|
|
||||||
transport http.RoundTripper `json:"-"``
|
Transport http.RoundTripper `json:"-"``
|
||||||
uri *url.URL
|
uri *url.URL
|
||||||
httpClient *http.Client
|
httpClient *http.Client
|
||||||
bodyRegexp *regexp.Regexp
|
bodyRegexp *regexp.Regexp
|
||||||
@ -187,14 +187,14 @@ func (a *ActiveHealthChecks) Provision(ctx caddy.Context, h *Handler) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("loading transport: %v", err)
|
return fmt.Errorf("loading transport: %v", err)
|
||||||
}
|
}
|
||||||
a.transport = mod.(http.RoundTripper)
|
a.Transport = mod.(http.RoundTripper)
|
||||||
} else {
|
} else {
|
||||||
a.transport = h.Transport
|
a.Transport = h.Transport
|
||||||
}
|
}
|
||||||
|
|
||||||
a.httpClient = &http.Client{
|
a.httpClient = &http.Client{
|
||||||
Timeout: timeout,
|
Timeout: timeout,
|
||||||
Transport: a.transport,
|
Transport: a.Transport,
|
||||||
CheckRedirect: func(req *http.Request, via []*http.Request) error {
|
CheckRedirect: func(req *http.Request, via []*http.Request) error {
|
||||||
if !a.FollowRedirects {
|
if !a.FollowRedirects {
|
||||||
return http.ErrUseLastResponse
|
return http.ErrUseLastResponse
|
||||||
|
Loading…
x
Reference in New Issue
Block a user