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
|
||||
}
|
||||
header := make(http.Header)
|
||||
for _, h := range cfg.Headers {
|
||||
for _, h := range cfg.HTTPHeaders {
|
||||
header.Set(h.Name, h.Value)
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ healthCheck.intervalSeconds = 10
|
||||
healthCheck.maxFailed = 3
|
||||
healthCheck.timeoutSeconds = 3
|
||||
# set health check headers
|
||||
healthCheck.headers=[
|
||||
healthCheck.httpheaders=[
|
||||
{ name = "x-from-where", value = "frp" }
|
||||
]
|
||||
|
||||
|
@ -99,7 +99,7 @@ type HealthCheckConfig struct {
|
||||
Path string `json:"path,omitempty"`
|
||||
// Headers specifies the headers to send health checks to if the
|
||||
// health check type is "http".
|
||||
Headers []HTTPHeader `json:"headers,omitempty"`
|
||||
HTTPHeaders []HTTPHeader `json:"httpHeaders,omitempty"`
|
||||
}
|
||||
|
||||
type DomainConfig struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user