默认ingress-nginx 会过滤掉header中带下划线 '_' 的header, header名称不建议使用下划线
修改代码,带下划线的修改为中横线'_'
configmap中开启 enable-underscores-in-headers 参数, 默认 false
enable-underscores-in-headers
controller: ... config: ... enable-underscores-in-headers: "true" ...
https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#enable-underscores-in-headers
Last updated 3 years ago