mirror of
https://github.com/fatedier/frp.git
synced 2025-06-17 00:38:22 +00:00
add header for http health check
This commit is contained in:
parent
bb7d51b0db
commit
adb4d3d33d
@ -74,7 +74,7 @@ func NewMonitor(ctx context.Context, cfg v1.HealthCheckConfig, addr string,
|
|||||||
url = s + cfg.Path
|
url = s + cfg.Path
|
||||||
}
|
}
|
||||||
header := make(http.Header)
|
header := make(http.Header)
|
||||||
for _, h := range cfg.Headers {
|
for _, h := range cfg.HTTPHeaders {
|
||||||
header.Set(h.Name, h.Value)
|
header.Set(h.Name, h.Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ healthCheck.intervalSeconds = 10
|
|||||||
healthCheck.maxFailed = 3
|
healthCheck.maxFailed = 3
|
||||||
healthCheck.timeoutSeconds = 3
|
healthCheck.timeoutSeconds = 3
|
||||||
# set health check headers
|
# set health check headers
|
||||||
healthCheck.headers=[
|
healthCheck.httpheaders=[
|
||||||
{ name = "x-from-where", value = "frp" }
|
{ name = "x-from-where", value = "frp" }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ type HealthCheckConfig struct {
|
|||||||
Path string `json:"path,omitempty"`
|
Path string `json:"path,omitempty"`
|
||||||
// Headers specifies the headers to send health checks to if the
|
// Headers specifies the headers to send health checks to if the
|
||||||
// health check type is "http".
|
// health check type is "http".
|
||||||
Headers []HTTPHeader `json:"headers,omitempty"`
|
HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type DomainConfig struct {
|
type DomainConfig struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user