Skip to content

Commit

Permalink
Extend allowed origins (#4635)
Browse files Browse the repository at this point in the history
  • Loading branch information
ljakimczuk authored Nov 12, 2024
1 parent 3fede0f commit 102c7cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion helm/happa/templates/happaapi-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"

nginx.ingress.kubernetes.io/cors-allow-origin: {{ .Values.happa.address | quote }}
nginx.ingress.kubernetes.io/cors-allow-origin: {{ concat (list .Values.happa.address) .Values.happaapi.allowedOrigins | join ", " | quote }}
nginx.ingress.kubernetes.io/cors-allow-headers: DNT, X-CustomHeader, Keep-Alive, User-Agent, X-Requested-With, If-Modified-Since, Cache-Control, Content-Type, Authorization, Impersonate-User, Impersonate-Group
nginx.ingress.kubernetes.io/enable-cors: "true"

Expand Down
3 changes: 3 additions & 0 deletions helm/happa/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@
"address": {
"type": "string"
},
"allowedOrigins": {
"type": "array"
},
"host": {
"type": "string"
},
Expand Down
1 change: 1 addition & 0 deletions helm/happa/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ happa:
happaapi:
address: ""
host: check
allowedOrigins: []

athena:
address: ""
Expand Down

0 comments on commit 102c7cd

Please sign in to comment.