Skip to content

Configure proxy_set_header Host in kind: Ingress #7581

Description

@shaun-nx

Overview

As an application developer who manages Ingress routes
I want to explicitly set the value of the upstream host header in Kind: Ingress and VirtualServer
So that I can ensure the same host value is always maintained

This functionality is similar to nginx.ingress.kubernetes.io/upstream-vhost

Requirements

  • Users must be able to explicitly configure the upstream Host header value.
  • The feature must support standard Kubernetes Ingress resources.
  • The feature must support VirtualServer resources.
  • When the feature is configured, NGINX Ingress Controller must generate configuration equivalent to: proxy_set_header Host example.internal;
  • When the feature is not configured, existing behavior must remain unchanged.
  • The feature must not require users to use custom snippets or modify the NGINX template.
  • The controller should validate the configured value and reject clearly invalid host values.

Acceptance Criteria

  • Allow proxy_set_header Host to be set to an explicit value, other than $host [decision is to implement new annotation upstream-vhost]
  • Given an Ingress resource with an explicit upstream host value configured,
    when a request is proxied to the upstream service,
    then the upstream service receives the configured value in the Host header instead of the original request host.
  • Given a VirtualServer resource with an explicit upstream host value configured,
    when a request is proxied to the upstream service,
    then the upstream service receives the configured value in the Host header instead of the original request host.
  • Given no explicit upstream host value is configured,
    when a request is proxied to the upstream service,
    then the controller preserves the existing default behavior.

Metadata

Metadata

Assignees

Labels

area/apigatewayIssues related to API Gateway capabilitiesproposalAn issue that proposes a feature request

Projects

Status
In Review 👀

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions