Skip to content

Commit

Permalink
HTTP rewrite matches the example text (#1346)
Browse files Browse the repository at this point in the history
Co-authored-by: Kubernetes Prow Robot <k8s-ci-robot@users.noreply.github.com>
  • Loading branch information
subi9 and k8s-ci-robot committed Sep 26, 2022
1 parent 1b83499 commit 303445c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#$ Used in:
#$ - site-src/api-types/httproute.md
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: http-filter-rewrite
spec:
hostnames:
- rewrite.example
rules:
- filters:
- type: URLRewrite
urlRewrite:
hostname: elsewhere.example
path:
type: ReplacePrefixMatch
replacePrefixMatch: /fennel
backendRefs:
- name: example-svc
weight: 1
port: 80
2 changes: 1 addition & 1 deletion site-src/guides/http-redirect-rewrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ Instead using `type: ReplacePrefixMatch` and `replacePrefixMatch: /fennel` will
request `https://elsewhere.example/fennel/smidgen` upstream.

```yaml
{% include 'experimental/http-redirect-rewrite/httproute-rewrite.yaml' %}
{% include 'experimental/http-redirect-rewrite/httproute-rewritepath.yaml' %}
```

0 comments on commit 303445c

Please sign in to comment.