proxy: support https health checking

This commit is contained in:
nadoo committed 2021-12-22 21:20:29 +08:00
1 parent 826695df9a
commit 71c7cd2823
8 files changed
+63 -34

No files matched your search

+2 -2
View File
@@ -9,7 +9,7 @@ import (
// Config is config of rule.
type Config struct {
Name string
RulePath string
Forward []string
Strategy Strategy
@@ -38,7 +38,7 @@ type Strategy struct {
// NewConfFromFile returns a new config from file.
func NewConfFromFile(ruleFile string) (*Config, error) {
p := &Config{Name: ruleFile}
p := &Config{RulePath: ruleFile}
f := conflag.NewFromFile("rule", ruleFile)
f.StringSliceUniqVar(&p.Forward, "forward", nil, "forward url, format: SCHEME://[USER|METHOD:PASSWORD@][HOST]:PORT?PARAMS[,SCHEME://[USER|METHOD:PASSWORD@][HOST]:PORT?PARAMS]")