Skip to content

Enable CORS releated capabilities in kind: Ingress #7089

@shaun-nx

Description

@shaun-nx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ingressIssues related to changes in `kind: Ingress`proposalAn issue that proposes a feature request

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions