nginx.ingress.kubernetes.io/cors-allow-origin ignores “null” – PullAnswer
I setup 2 ingress resources, one is a redirect and the other is a normal ingresss with hosts rules.
Due to the nature of the 301 the browser will send the next request with “Origin: null”
I tried adding null to nginx.ingress.kubernetes.io/cors-allow-origin
nginx.ingress.kubernetes.io/cors-allow-methods: PUT, GET, POST, OPTIONS
nginx.ingress.kubernetes.io/cors-allow-origin: null
nginx.ingress.kubernetes.io/enable-cors: true
nginx.ingress.kubernetes.io/force-ssl-redirect: true
However this seem to be ingnored entierly
I fact I did:
nginx.ingress.kubernetes.io/cors-allow-methods: PUT, GET, POST, OPTIONS
nginx.ingress.kubernetes.io/cors-allow-origin: null, https://test.example.org
nginx.ingress.kubernetes.io/enable-cors: true
nginx.ingress.kubernetes.io/force-ssl-redirect: true
And the example.org hosts shows in nginx.conf on the “http_origin” section, null does not.
Is this by design?
Read more here: Source link