Skip to content

nginx.ingress.kubernetes.io/cors-allow-origin ignores "null" #8983

@mike-pt

Description

@mike-pt

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?

Metadata

Metadata

Assignees

Labels

help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions