Line data Source code
1 : #pragma once 2 : 3 : #include "envoy/stream_info/filter_state.h" 4 : 5 : #include "absl/strings/string_view.h" 6 : 7 : namespace Envoy { 8 : namespace Network { 9 : 10 : /** 11 : * Server name to set in the upstream connection. The filters like tcp_proxy should use this 12 : * value to override the server name specified in the upstream cluster, for example to override 13 : * the SNI value in the upstream TLS context. 14 : */ 15 : class UpstreamServerName : public StreamInfo::FilterState::Object { 16 : public: 17 0 : UpstreamServerName(absl::string_view server_name) : server_name_(server_name) {} 18 0 : const std::string& value() const { return server_name_; } 19 : static const std::string& key(); 20 : 21 : private: 22 : const std::string server_name_; 23 : }; 24 : 25 : } // namespace Network 26 : } // namespace Envoy