Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarifying how ReplacePrefixMatch works #1189

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions apis/v1alpha2/httproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,12 @@ const (
// replaced by the substitution value. For example, a path with a prefix
// match of "/foo" and a ReplacePrefixMatch substitution of "/bar" will have
// the "/foo" prefix replaced with "/bar" in matching requests.
//
// Note that this matches the behavior of the PathPrefix match type. This
// matches full path elements. A path element refers to the list of labels
// in the path split by the `/` separator. When specified, a trailing `/` is
// ignored. For example, the paths `/abc`, `/abc/`, and `/abc/def` would all
// match the prefix `/abc`, but the path `/abcd` would not.
PrefixMatchHTTPPathModifier HTTPPathModifierType = "ReplacePrefixMatch"
)

Expand All @@ -741,6 +747,12 @@ type HTTPPathModifier struct {
// match of a request during a rewrite or redirect. For example, a request
// to "/foo/bar" with a prefix match of "/foo" would be modified to "/bar".
//
// Note that this matches the behavior of the PathPrefix match type. This
// matches full path elements. A path element refers to the list of labels
// in the path split by the `/` separator. When specified, a trailing `/` is
// ignored. For example, the paths `/abc`, `/abc/`, and `/abc/def` would all
// match the prefix `/abc`, but the path `/abcd` would not.
//
// <gateway:experimental>
// +kubebuilder:validation:MaxLength=1024
// +optional
Expand Down
40 changes: 36 additions & 4 deletions config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.