ansible-role-k8s-traefik/templates/2.1/traefik-middleware-headers.yml.j2
Adrien 04e2b73dcd
All checks were successful
continuous-integration/drone/push Build is passing
Add default security headers
2020-07-07 23:33:17 +02:00

31 lines
No EOL
836 B
Django/Jinja

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: security-headers
namespace: {{ traefik_namespace }}
spec:
headers:
browserXssFilter: "true"
contentTypeNosniff: "true"
forceSTSHeader: "true"
frameDeny = "true"
stsIncludeSubdomains: "true"
stsPreload: "true"
stsSeconds: "15768000"
sslRedirect: "true"
contentSecurityPolicy = "default-src 'self' 'unsafe-inline'"
customFrameOptionsValue: "SAMEORIGIN"
referrerPolicy = "same-origin"
featurePolicy = "vibrate 'self'"
# CORS
accessControlAllowMethods:
- "GET"
- "OPTIONS"
- "PUT"
accessControlAllowOrigin = "origin-list-or-null"
# accessControlAllowOriginList:
# - "https://foo.bar.org"
# - "https://example.org"
accessControlMaxAge: 100
addVaryHeader: "true"