Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions proxy/http/HttpSM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4800,11 +4800,13 @@ HttpSM::get_outbound_sni() const
{
const char *sni_name = nullptr;
size_t len = 0;
if (t_state.txn_conf->ssl_client_sni_policy != nullptr && !strcmp(t_state.txn_conf->ssl_client_sni_policy, "remap")) {
if (t_state.txn_conf->ssl_client_sni_policy == nullptr || !strcmp(t_state.txn_conf->ssl_client_sni_policy, "host")) {
// By default the host header field value is used for the SNI.
sni_name = t_state.hdr_info.server_request.host_get(reinterpret_cast<int *>(&len));
} else {
// If other is specified, like "remap" and "verify_with_name_source", the remapped origin name is used for the SNI value
len = strlen(t_state.server_info.name);
sni_name = t_state.server_info.name;
} else { // Do the default of host header for SNI
sni_name = t_state.hdr_info.server_request.host_get(reinterpret_cast<int *>(&len));
}
return std::string_view(sni_name, len);
}
Expand Down