Skip to content

Commit 08c35d8

Browse files
chore(): http redirect fix v6
1 parent 25f33a8 commit 08c35d8

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

charts/ai-gateway-core/templates/envoypatchpolicy-308.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@ spec:
1414
- type: "type.googleapis.com/envoy.config.route.v3.RouteConfiguration"
1515
name: "{{ .Values.namespace | default .Release.Namespace }}/{{ .Values.gateway.name }}/http"
1616
operation:
17-
# Patching the responseCode to 308 (PERMANENT_REDIRECT)
18-
# We target the first virtual host and first route since it's the redirect route
19-
op: replace
20-
path: /virtualHosts/0/routes/0/redirect/responseCode
17+
# Patching indices 1 and 2 which correspond to our actual domains
18+
# Index 0 is a wildcard host that doesn't have a redirect
19+
op: add
20+
path: /virtual_hosts/1/routes/0/redirect/response_code
21+
value: "PERMANENT_REDIRECT"
22+
- type: "type.googleapis.com/envoy.config.route.v3.RouteConfiguration"
23+
name: "{{ .Values.namespace | default .Release.Namespace }}/{{ .Values.gateway.name }}/http"
24+
operation:
25+
op: add
26+
path: /virtual_hosts/2/routes/0/redirect/response_code
2127
value: "PERMANENT_REDIRECT"
2228
{{- end }}

0 commit comments

Comments
 (0)