| 708 | } |
| 709 | |
| 710 | bool SetOrigin( |
| 711 | ThriftServer::ConnectionContext* connection_context, const std::string& origin) { |
| 712 | connection_context->http_origin = origin; |
| 713 | if (FLAGS_use_xff_address_as_origin) { |
| 714 | std::string origin_client; |
| 715 | Status status = GetXFFOriginClientAddress(origin, origin_client); |
| 716 | if (!status.ok()) { |
| 717 | LOG(ERROR) << "Error parsing XFF header: " << status; |
| 718 | } else { |
| 719 | connection_context->network_address = MakeNetworkAddress(origin_client); |
| 720 | } |
| 721 | } |
| 722 | return false; |
| 723 | } |
| 724 | |
| 725 | bool SetRequestId(ThriftServer::ConnectionContext* connection_context, |
| 726 | const std::string& request_id) { |
nothing calls this directly
no test coverage detected