envoyproxy / envoyproxy/envoy

Custom headers are not available to the SNI `override_auto_sni_header` when added using `request_headers_to_add`

Open
#18,308 3 comments 1 reaction 0 assignees View on GitHub
area/http area/tls help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

## Title

Custom headers are not available to the SNI `override_auto_sni_header` when added using `request_headers_to_add`

## Description

We now allow a customer header to populate the SNI for the upstream requests [[Link]](https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/core/v3/protocol.proto#:~:text=with%20auto_sni%20field.-,override_auto_sni_header,-(string)%20An%20optional). But, if the custom header is not coming from downstream and gets added anywhere using `request_headers_to_add` then it's value is not available here as [this](https://github.com/envoyproxy/envoy/blob/5b1015cffbf6e02a7ccec9c12a6b7f246f8f3d30/source/common/router/router.cc#L517) piece of code to populate the SNI gets invoked before we add/modify the request headers [probably here](https://github.com/envoyproxy/envoy/blob/5b1015cffbf6e02a7ccec9c12a6b7f246f8f3d30/source/common/router/router.cc#L648).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.