http_GetReq(w, vc->fd, vc->http, sp->http);
http_FilterHeader(w, vc->fd, vc->http, sp->http, HTTPH_R_FETCH);
http_PrintfHeader(w, vc->fd, vc->http, "X-Varnish: %u", sp->xid);
+ http_PrintfHeader(w, vc->fd, vc->http,
+ "X-Forwarded-for: %s", sp->addr);
if (!http_GetHdr(vc->http, H_Host, &b)) {
http_PrintfHeader(w, vc->fd, vc->http, "Host: %s",
sp->backend->hostname);
http_CopyResp(sp->wrk, sp->fd, sp->http, vc->http);
http_FilterHeader(sp->wrk, sp->fd, sp->http, vc->http, HTTPH_A_PASS);
http_PrintfHeader(sp->wrk, sp->fd, sp->http, "X-Varnish: %u", sp->xid);
+ http_PrintfHeader(sp->wrk, sp->fd, sp->http,
+ "X-Forwarded-for: %s", sp->addr);
/* XXX */
if (http_HdrIs(vc->http, H_Transfer_Encoding, "chunked"))
http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Transfer-Encoding: chunked");
http_CopyReq(w, vc->fd, vc->http, sp->http);
http_FilterHeader(w, vc->fd, vc->http, sp->http, HTTPH_R_PIPE);
http_PrintfHeader(w, vc->fd, vc->http, "X-Varnish: %u", sp->xid);
+ http_PrintfHeader(w, vc->fd, vc->http,
+ "X-Forwarded-for: %s", sp->addr);
WRK_Reset(w, &vc->fd);
http_Write(w, vc->http, 0);