如何解决如何在Nginx Ingress上添加自定义安全策略和引用策略
我只是尝试使用配置代码段注释,但是没有用
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "Content-Security-Policy: script-src 'self'";
more_set_headers "Referrer-Policy: 'same-origin';"
more_set_headers "Feature-Policy: "geolocation 'none'; vibrate 'none';";"
还有其他方法吗? 我的nginx控制器版本是nginx-ingress:1.8.1,并在gcp上运行
解决方法
Nginx Ingress Controller 有其自己的方法,用于为上游服务器定义custom http headers。
您正在尝试使用一种方法,该方法需要为 nginx 安装其他第三方模块。此模块未打包到base image of the Controller中。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。