Skip to content

Commit

Permalink
move cors again!
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Peder Amlie committed Apr 14, 2021
1 parent e239b6a commit 658dea7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion charts/platform-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: Platform service chart
name: platform-service
version: 1.0.21
version: 1.0.22
8 changes: 4 additions & 4 deletions charts/platform-service/templates/virtualservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ spec:
- route:
- destination:
host: {{ include "platform-service.serviceName" . | quote }}
{{- if .Values.defaultRouting.corsPolicy }}
corsPolicy:
{{ .Values.defaultRouting.corsPolicy | toYaml | trim | indent 6 }}
{{- end -}}

{{- if not .Values.defaultRouting.catchAll }}
match:
Expand All @@ -78,10 +82,6 @@ spec:
rewrite:
uri: {{ required "rewriteUri is required" .Values.defaultRouting.rewriteUrlPrefix.replaceWith }}
{{- end}}
{{- if .Values.defaultRouting.corsPolicy }}
corsPolicy:
{{ .Values.defaultRouting.corsPolicy | toYaml | trim | indent 6 }}
{{- end -}}
# deprecated
headers:
request:
Expand Down
20 changes: 10 additions & 10 deletions charts/platform-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ defaultRouting:
# attempts: 3
# perTryTimeout: 2s

# corsPolicy:
# allowOrigins:
# - exact: https://example.com
# allowMethods:
# - POST
# - GET
# allowCredentials: false
# allowHeaders:
# - X-Foo-Bar
# maxAge: "24h"
corsPolicy:
allowOrigins:
- exact: https://example.com
allowMethods:
- POST
- GET
allowCredentials: false
allowHeaders:
- X-Foo-Bar
maxAge: "24h"

# Specify network policies
networkPolicy:
Expand Down

0 comments on commit 658dea7

Please sign in to comment.