Nginx ingress 跨域
- Nginx ingress 跨域:
nginx.ingress.kubernetes.io/cors-allow-headers: >-
DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
nginx.ingress.kubernetes.io/cors-allow-methods: 'PUT, GET, POST, OPTIONS'
nginx.ingress.kubernetes.io/cors-allow-origin: '*'
nginx.ingress.kubernetes.io/enable-cors: 'true'
nginx.ingress.kubernetes.io/service-weight: ''
参考链接:http://www.devopser.org/articles/2019/11/06/1573006159751.html
- ingress解决跨域问题:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-connect-timeout: '30'
nginx.ingress.kubernetes.io/proxy-send-timeout: '500'
nginx.ingress.kubernetes.io/proxy-read-timeout: '500'
nginx.ingress.kubernetes.io/send-timeout: "500"
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-methods: "*"
nginx.ingress.kubernetes.io/cors-allow-origin: "*"
ingress.kubernetes.io/rewrite-target: /
参考链接:https://juejin.im/post/5dde1f5ff265da05f4692152
- ingress 开启jwt:
nginx.com/jwt-key: "cafe-jwk"
nginx.com/jwt-realm: "Cafe App"
nginx.com/jwt-token: "$cookie_auth_token"
nginx.com/jwt-login-url: "https://login.example.com"
参考链接:https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/jwt
【励志篇】:
古之成大事掌大学问者,不惟有超世之才,亦必有坚韧不拔之志。