Skip to content

Commit

Permalink
Merge pull request #37 from tum-gis/feature/ingress-headers
Browse files Browse the repository at this point in the history
Ingress configuration snippet headers
  • Loading branch information
MarijaKnezevic authored Apr 20, 2024
2 parents fa1d1df + 1d39a07 commit 637840e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/sddi-ckan/charts/ckan/templates/ckan-ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ metadata:
{{- end }}
nginx.ingress.kubernetes.io/proxy-body-size: "{{ .Values.maxUploadSizeMB }}m"
nginx.org/client-max-body-size: "{{ .Values.maxUploadSizeMB }}m"
nginx.ingress.kubernetes.io/configuration-snippet: {{- .Values.ingress.configurationSnippet | toYaml | indent 4 }}
{{- if .Values.ingress.stickySessions.enabled }}
# https://kubernetes.github.io/ingress-nginx/examples/affinity/cookie/
nginx.ingress.kubernetes.io/affinity: "cookie"
Expand Down
5 changes: 5 additions & 0 deletions charts/sddi-ckan/charts/ckan/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ ingress:
tls:
# -- Specify a custom tls secret name. This overwrites `global.ingress.tls.secretName`.
secretName:
configurationSnippet: |
more_set_headers "X-Frame-Options: DENY";
more_set_headers "X-Xss-Protection: 0";
more_set_headers "X-Content-Type-Options: nosniff";
more_set_headers "Content-Security-Policy: object-src 'none'; child-src 'self'; frame-ancestors 'none'; base-uri 'none'; upgrade-insecurerequests; blockall-mixed-content; require-trustedtypes-for 'script'";
# General settings
# -- CKAN site url. This should match a domain name of CKAN specified in `ingress.domains`/`global.ingress.domains`
Expand Down

0 comments on commit 637840e

Please sign in to comment.