即使我正在检查文档和 github 问题,我也无法通过注释在入口配置文件中正确设置 HSTS 标头。它复制了标题。
我的入口注释部分如下所示:
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;
这是为什么?另一个标题设置在哪里?