Commit 4548b098 authored by Dominik Hebeler's avatar Dominik Hebeler

Merge branch '997-add-csp-header' into 'development'

Resolve "Add CSP Header"

Closes #997

See merge request !1646
parents 22f3b457 cb2afda2
...@@ -25,6 +25,11 @@ ingress: ...@@ -25,6 +25,11 @@ ingress:
annotations: annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/configuration-snippet: | nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; script-src-elem; script-src-attr; style-src 'self' 'unsafe-inline'; style-src-elem; style-src-attr; img-src 'self'; font-src 'self'; connect-src 'self'; media-src; object-src; prefetch-src; child-src; frame-src 'self'; worker-src; frame-ancestors 'self' https://scripts.zdv.uni-mainz.de; form-action 'self'; base-uri; manifest-src; plugin-types; report-uri; report-to";
more_set_headers "X-Frame-Options: DENY";
more_set_headers "X-Content-Type-Options: nosniff";
more_set_headers "ReferrerPolicy: origin";
more_set_headers "X-XSS-Protection: 1; mode=block";
if ($host = "www.metager3.de") { if ($host = "www.metager3.de") {
return 301 https://metager3.de$request_uri; return 301 https://metager3.de$request_uri;
} }
...@@ -25,6 +25,11 @@ ingress: ...@@ -25,6 +25,11 @@ ingress:
annotations: annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/configuration-snippet: | nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; script-src-elem; script-src-attr; style-src 'self' 'unsafe-inline'; style-src-elem; style-src-attr; img-src 'self'; font-src 'self'; connect-src 'self'; media-src; object-src; prefetch-src; child-src; frame-src 'self'; worker-src; frame-ancestors 'self' https://scripts.zdv.uni-mainz.de; form-action 'self'; base-uri; manifest-src; plugin-types; report-uri; report-to";
more_set_headers "X-Frame-Options: DENY";
more_set_headers "X-Content-Type-Options: nosniff";
more_set_headers "ReferrerPolicy: origin";
more_set_headers "X-XSS-Protection: 1; mode=block";
if ($host = "www.metager.de") { if ($host = "www.metager.de") {
return 301 https://metager.de$request_uri; return 301 https://metager.de$request_uri;
} }
......
...@@ -5,6 +5,12 @@ ingress: ...@@ -5,6 +5,12 @@ ingress:
annotations: annotations:
kubernetes.io/tls-acme: "false" kubernetes.io/tls-acme: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false" nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline'; script-src-elem; script-src-attr; style-src 'self' 'unsafe-inline'; style-src-elem; style-src-attr; img-src 'self'; font-src 'self'; connect-src 'self'; media-src; object-src; prefetch-src; child-src; frame-src 'self'; worker-src; frame-ancestors 'self' https://scripts.zdv.uni-mainz.de; form-action 'self'; base-uri; manifest-src; plugin-types; report-uri; report-to";
more_set_headers "X-Frame-Options: DENY";
more_set_headers "X-Content-Type-Options: nosniff";
more_set_headers "ReferrerPolicy: origin";
more_set_headers "X-XSS-Protection: 1; mode=block";
tls: tls:
enabled: false enabled: false
service: service:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment