...
1apiVersion: gateway.networking.k8s.io/v1
2kind: HTTPRoute
3metadata:
4 name: redirect-scheme
5 namespace: gateway-conformance-infra
6spec:
7 parentRefs:
8 - name: same-namespace
9 rules:
10 - matches:
11 - path:
12 type: PathPrefix
13 value: /scheme
14 filters:
15 - type: RequestRedirect
16 requestRedirect:
17 scheme: "https"
18 - matches:
19 - path:
20 type: PathPrefix
21 value: /scheme-and-host
22 filters:
23 - type: RequestRedirect
24 requestRedirect:
25 hostname: example.org
26 scheme: "https"
27 - matches:
28 - path:
29 type: PathPrefix
30 value: /scheme-and-status
31 filters:
32 - type: RequestRedirect
33 requestRedirect:
34 scheme: "https"
35 statusCode: 301
36 - matches:
37 - path:
38 type: PathPrefix
39 value: /scheme-and-host-and-status
40 filters:
41 - type: RequestRedirect
42 requestRedirect:
43 scheme: "https"
44 statusCode: 302
45 hostname: example.org
46
View as plain text