1
0
Fork 0

Fix HTTPRoute Redirect Filter with port and scheme

Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
This commit is contained in:
Romain 2024-06-06 10:56:03 +02:00 committed by GitHub
parent 7eac92f49c
commit 28d40e7f3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 431 additions and 93 deletions

View file

@ -42,6 +42,7 @@ type Middleware struct {
// Gateway API HTTPRoute filters middlewares.
RequestHeaderModifier *RequestHeaderModifier `json:"requestHeaderModifier,omitempty" toml:"-" yaml:"-" label:"-" file:"-" kv:"-" export:"true"`
RequestRedirect *RequestRedirect `json:"requestRedirect,omitempty" toml:"-" yaml:"-" label:"-" file:"-" kv:"-" export:"true"`
}
// +k8s:deepcopy-gen=true
@ -685,3 +686,12 @@ type RequestHeaderModifier struct {
Add map[string]string `json:"add,omitempty"`
Remove []string `json:"remove,omitempty"`
}
// +k8s:deepcopy-gen=true
// RequestRedirect holds the request redirect middleware configuration.
type RequestRedirect struct {
Regex string `json:"regex,omitempty"`
Replacement string `json:"replacement,omitempty"`
Permanent bool `json:"permanent,omitempty"`
}