Even though I'm checking docs and github issues I cannot set HSTS headers properly in ingress configuration files via annotations. It duplicated the header.
My ingress annotations part looks like this:
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-production"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.org/websocket-services: web-page
nginx.ingress.kubernetes.io/websocket-services: web-page
nginx.ingress.kubernetes.io/proxy-send-timeout: "1800"
nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"
nginx.ingress.kubernetes.io/proxy-body-size: 20m
nginx.ingress.kubernetes.io/client-max-body-size: 20m
nginx.ingress.kubernetes.io/server-snippet: |
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
But the response headers in the browser show this:
Why is that? Where the other header is set?