nginx-ingress-controller
配置跨域:(直接在ingress 的annation里面加)
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/cors-allow-credentials: true
nginx.ingress.kubernetes.io/cors-allow-headers: DNT,web-token,app-token,Authorization,Accept,Origin,Keep-Alive,User-Agent,X-Mx-ReqToken,X-Data-Type,X-Auth-Token,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,token,Cookie
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/Access-Control-Allow-Origin: *
nginx.ingress.kubernetes.io/proxy-body-size: 300m
proxy-body-size: 300m
compute-full-forwarded-for:true
forwarded-for-header:X-Forwarded-For
use-forwarded-headers:true
use-gzip true
gzip-level 5
gzip-types *