Summary:
Envoy recently added forwarded_proto_config to infer X-Forwarded-Proto from PROXY Protocol
destination port (envoyproxy/envoy#43031, merged via envoyproxy/envoy#43088).
This enables proper HTTP→HTTPS redirect when using AWS NLB TLS termination + PROXY Protocol v2.
Envoy Configuration (new feature in main, will be in next release):
http_connection_manager:
forwarded_proto_config:
https_destination_ports: [443, 8443]
http_destination_ports: [80, 8080]
Requested Feature:
Expose this in ContourConfiguration, likely under envoy.listener alongside existing useProxyProtocol:
apiVersion: projectcontour.io/v1alpha1
kind: ContourConfiguration
spec:
envoy:
listener:
useProxyProtocol: true
forwardedProtoConfig: # NEW
httpsDestinationPorts: [443]
httpDestinationPorts: [80]
Implementation Notes:
- Current PROXY Protocol handling:
internal/xdscache/v3/listener.go → proxyProtocol()
- New config goes in:
internal/envoy/v3/listener.go → httpConnectionManagerBuilder
- The
forwarded_proto_config is set on HCM, not on the listener filter
Use Case:
AWS NLB terminates TLS (ACM certificates) → PROXY Protocol v2 → Contour/Envoy.
Without this, X-Forwarded-Proto is always http, causing redirect loops with HTTPProxy's
tls.secretName (secure-first policy).
References:
Summary:
Envoy recently added
forwarded_proto_configto inferX-Forwarded-Protofrom PROXY Protocoldestination port (envoyproxy/envoy#43031, merged via envoyproxy/envoy#43088).
This enables proper HTTP→HTTPS redirect when using AWS NLB TLS termination + PROXY Protocol v2.
Envoy Configuration (new feature in main, will be in next release):
Requested Feature:
Expose this in ContourConfiguration, likely under
envoy.listeneralongside existinguseProxyProtocol:Implementation Notes:
internal/xdscache/v3/listener.go→proxyProtocol()internal/envoy/v3/listener.go→httpConnectionManagerBuilderforwarded_proto_configis set on HCM, not on the listener filterUse Case:
AWS NLB terminates TLS (ACM certificates) → PROXY Protocol v2 → Contour/Envoy.
Without this,
X-Forwarded-Protois alwayshttp, causing redirect loops with HTTPProxy'stls.secretName(secure-first policy).References: