diff --git a/client/health/health.go b/client/health/health.go index 34c85da5..d298e615 100644 --- a/client/health/health.go +++ b/client/health/health.go @@ -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) } diff --git a/conf/frpc_full_example.toml b/conf/frpc_full_example.toml index 1e4c9a53..4dae6b3c 100644 --- a/conf/frpc_full_example.toml +++ b/conf/frpc_full_example.toml @@ -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" } ] diff --git a/pkg/config/v1/proxy.go b/pkg/config/v1/proxy.go index f45c001a..9d91b585 100644 --- a/pkg/config/v1/proxy.go +++ b/pkg/config/v1/proxy.go @@ -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 {