Skip to content

Commit

Permalink
config: allow multiple cors origins (#1572)
Browse files Browse the repository at this point in the history
This config template change allows multiple CORS origins to be supplied
via an comma separated env var.
  • Loading branch information
taonic authored Aug 23, 2023
1 parent 2bace54 commit 90de0ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/docker/config-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ cors:
cookieInsecure: {{ default .Env.TEMPORAL_CSRF_COOKIE_INSECURE "false" }}
allowOrigins:
# override framework's default that allows all origins "*"
- {{ default .Env.TEMPORAL_CORS_ORIGINS "http://localhost:8080" }}
{{- if .Env.TEMPORAL_CORS_ORIGINS }} {{ range $seed := (split .Env.TEMPORAL_CORS_ORIGINS ",") }}
- {{ . }} {{ end }}
{{- else}}
- "http://localhost:8080"
{{- end }}
tls:
caFile: {{ default .Env.TEMPORAL_TLS_CA "" }}
certFile: {{ default .Env.TEMPORAL_TLS_CERT "" }}
Expand Down

0 comments on commit 90de0ff

Please sign in to comment.