File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4749,11 +4749,13 @@ HttpSM::get_outbound_sni() const
47494749{
47504750 const char *sni_name = nullptr ;
47514751 size_t len = 0 ;
4752- if (t_state.txn_conf ->ssl_client_sni_policy != nullptr && !strcmp (t_state.txn_conf ->ssl_client_sni_policy , " remap" )) {
4752+ if (t_state.txn_conf ->ssl_client_sni_policy == nullptr || !strcmp (t_state.txn_conf ->ssl_client_sni_policy , " host" )) {
4753+ // By default the host header field value is used for the SNI.
4754+ sni_name = t_state.hdr_info .server_request .host_get (reinterpret_cast <int *>(&len));
4755+ } else {
4756+ // If other is specified, like "remap" and "verify_with_name_source", the remapped origin name is used for the SNI value
47534757 len = strlen (t_state.server_info .name );
47544758 sni_name = t_state.server_info .name ;
4755- } else { // Do the default of host header for SNI
4756- sni_name = t_state.hdr_info .server_request .host_get (reinterpret_cast <int *>(&len));
47574759 }
47584760 return std::string_view (sni_name, len);
47594761}
You can’t perform that action at this time.
0 commit comments