add allowed-redirect config for upstream

This commit is contained in:
2025-01-21 15:18:07 +08:00
parent 08eed185cf
commit 7341742feb
3 changed files with 25 additions and 4 deletions

View File

@ -11,8 +11,9 @@ type UpstreamMatch struct {
}
type Upstream struct {
Server string `yaml:"server"`
Match UpstreamMatch `yaml:"match"`
Server string `yaml:"server"`
Match UpstreamMatch `yaml:"match"`
AllowedRedirect *string `yaml:"allowed-redirect"`
}
func (upstream Upstream) GetPath(orig string) (string, bool, error) {