X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Ffilter_frontend_net.cpp;h=7f448a23b0717c74095fa0b5effb9462fb997685;hb=a65b7be116265cf331eb823acc9e48738f30e33a;hp=3246eec922ac4cdac2609b797bb6995c0ec76b13;hpb=7ebda9fb6eb58f2c365a6ca0eb67f8a559f7119b;p=metaproxy-moved-to-github.git diff --git a/src/filter_frontend_net.cpp b/src/filter_frontend_net.cpp index 3246eec..7f448a2 100644 --- a/src/filter_frontend_net.cpp +++ b/src/filter_frontend_net.cpp @@ -362,6 +362,10 @@ void yf::FrontendNet::ZAssocChild::recv_GDU(Z_GDU *z_pdu, int len) { Z_HTTP_Request *hreq = z_pdu->u.HTTP_Request; + const char *f = z_HTTP_header_lookup(hreq->headers, "X-Forwarded-For"); + if (f) + p->origin().set_tcpip_address(std::string(f), m_session.id()); + if (m_p->m_stat_req.length() && !strcmp(hreq->path, m_p->m_stat_req.c_str())) {