diff --git a/src/shrpx_http2_downstream_connection.cc b/src/shrpx_http2_downstream_connection.cc index 27efbf83..c2e7cfad 100644 --- a/src/shrpx_http2_downstream_connection.cc +++ b/src/shrpx_http2_downstream_connection.cc @@ -357,7 +357,7 @@ int Http2DownstreamConnection::push_request_headers() { if (xffconf.add) { StringRef xff_value; - auto addr = upstream->get_client_handler()->get_ipaddr(); + const auto &addr = upstream->get_client_handler()->get_ipaddr(); if (xff) { xff_value = concat_string_ref(balloc, xff->value, StringRef::from_lit(", "), addr);