Skip to content

Commit

Permalink
Merge pull request #2633 from Tharsanan1/test-rc-1
Browse files Browse the repository at this point in the history
Template cors config
  • Loading branch information
CrowleyRajapakse authored Oct 28, 2024
2 parents d6cf1f6 + 080a191 commit a52aef4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions helm-charts/templates/data-plane/gateway-components/log-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,24 @@ data:
{{end}}
{{end}}

{{ if and .Values.wso2.apk.dp.gatewayRuntime.deployment .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.configs .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.configs.cors }}
[enforcer.cors]
enabled = {{ .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.configs.cors.enabled | default false }}
accessControlAllowOrigins = [{{ include "commaJoinedQuotedList" .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.configs.cors.accessControlAllowOrigins }}]
accessControlAllowMethods = [{{ include "commaJoinedQuotedList" .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.configs.cors.accessControlAllowMethods }}]
accessControlAllowHeaders = [{{ include "commaJoinedQuotedList" .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.configs.cors.accessControlAllowHeaders }}]
accessControlAllowCredentials = {{ .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.configs.cors.accessControlAllowCredentials | default false }}
accessControlExposeHeaders = [{{ include "commaJoinedQuotedList" .Values.wso2.apk.dp.gatewayRuntime.deployment.enforcer.configs.cors.accessControlExposeHeaders }}]
{{- else }}
[enforcer.cors]
enabled = true
accessControlAllowOrigins = ["*"]
accessControlAllowMethods = ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"]
accessControlAllowHeaders = ["authorization", "Access-Control-Allow-Origin", "Content-Type", "Internal-key", "apiKey"]
accessControlAllowCredentials = false
accessControlExposeHeaders = ["*"]
{{end}}

[enforcer.jwtGenerator]
publicCertificatePath = "/home/wso2/security/truststore/mg.pem"
privateKeyPath = "/home/wso2/security/keystore/mg.key"
Expand Down

0 comments on commit a52aef4

Please sign in to comment.