Commit 807e8a09 authored by Ian Holsman's avatar Ian Holsman
Browse files

PR:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89550 13f79535-47bb-0310-9956-ffa450edef68
parent f0d05926
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -532,20 +532,20 @@ int ap_proxy_http_handler(request_rec *r, proxy_server_conf *conf,
        /* Add X-Forwarded-For: so that the upstream has a chance to
         * determine, where the original request came from.
         */
        apr_table_mergen(r->headers_in, "X-Forwarded-For", r->connection->remote_ip);
        apr_table_setn(r->headers_in, "X-Forwarded-For", r->connection->remote_ip);

        /* Add X-Forwarded-Host: so that upstream knows what the
         * original request hostname was.
         */
        if ((buf = apr_table_get(r->headers_in, "Host"))) {
            apr_table_mergen(r->headers_in, "X-Forwarded-Host", buf);
            apr_table_setn(r->headers_in, "X-Forwarded-Host", buf);
        }

        /* Add X-Forwarded-Server: so that upstream knows what the
         * name of this proxy server is (if there are more than one)
         * XXX: This duplicates Via: - do we strictly need it?
         */
        apr_table_mergen(r->headers_in, "X-Forwarded-Server",
        apr_table_setn(r->headers_in, "X-Forwarded-Server",
                         r->server->server_hostname);
    }