Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable CORS releated capabilities in kind: Ingress #7089

Open
2 tasks
shaun-nx opened this issue Jan 9, 2025 · 1 comment
Open
2 tasks

Enable CORS releated capabilities in kind: Ingress #7089

shaun-nx opened this issue Jan 9, 2025 · 1 comment
Labels
area/ingress Issues related to changes in `kind: Ingress` proposal An issue that proposes a feature request ready for refinement An issue that was triaged and it is ready to be refined size/medium

Comments

@shaun-nx
Copy link
Contributor

shaun-nx commented Jan 9, 2025

Overview

When configuring CORS (Cross Origin Resource Sharing) in NGINX Ingress Controller today, it is possible through response and request header manipulation in VirtualServer

For example

responseHeaders:
  add:
    - name: Access-Control-Allow-Credentials
      value: "true"
    - name: Access-Control-Allow-Headers
      value: "X-Forwarded-For"
    - name: Access-Control-Allow-Methods
      value: "PUT, GET, POST, OPTIONS"
    - name: Access-Control-Allow-Origin
      value: "*"
    - name: Access-Control-Max-Age
      value: "seconds"

The goal of this issue is to allow users to configure these same headers with kind: Ingress

Acceptance Critera

  • Expose annotations to configure CORS related headers
  • Ensure annotations are validated

References

See here for how ingress-nginx annotations are set, and how they map to VirtualServer: https://docs.nginx.com/nginx-ingress-controller/installation/ingress-nginx/#header-manipulation

@shaun-nx shaun-nx added area/ingress Issues related to changes in `kind: Ingress` proposal An issue that proposes a feature request labels Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

Hi @shaun-nx thanks for reporting!

Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂

Cheers!

@lucacome lucacome moved this to Todo ☑ in NGINX Ingress Controller Jan 15, 2025
@shaun-nx shaun-nx changed the title Enable CORS release capabilities in kind: Ingress Enable CORS releated capabilities in kind: Ingress Jan 20, 2025
@shaun-nx shaun-nx added the ready for refinement An issue that was triaged and it is ready to be refined label Jan 20, 2025
@shaun-nx shaun-nx moved this from Todo ☑ to Prioritized backlog in NGINX Ingress Controller Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ingress Issues related to changes in `kind: Ingress` proposal An issue that proposes a feature request ready for refinement An issue that was triaged and it is ready to be refined size/medium
Projects
Status: Prioritized backlog
Development

No branches or pull requests

1 participant