add priority option in case some tool has inconsistent issue
This commit is contained in:
12
config.go
12
config.go
@ -5,15 +5,21 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type UpstreamPriorityGroup struct {
|
||||
Match string `yaml:"match"`
|
||||
Priority int `yaml:"priority"`
|
||||
}
|
||||
|
||||
type UpstreamMatch struct {
|
||||
Match string `yaml:"match"`
|
||||
Replace string `yaml:"replace"`
|
||||
}
|
||||
|
||||
type Upstream struct {
|
||||
Server string `yaml:"server"`
|
||||
Match UpstreamMatch `yaml:"match"`
|
||||
AllowedRedirect *string `yaml:"allowed-redirect"`
|
||||
Server string `yaml:"server"`
|
||||
Match UpstreamMatch `yaml:"match"`
|
||||
AllowedRedirect *string `yaml:"allowed-redirect"`
|
||||
PriorityGroups []UpstreamPriorityGroup `yaml:"priority-groups"`
|
||||
}
|
||||
|
||||
func (upstream Upstream) GetPath(orig string) (string, bool, error) {
|
||||
|
Reference in New Issue
Block a user