From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id A806B202F4 for ; Sun, 3 Jul 2016 01:21:10 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/2] examples: remove X-Forwarded-For mentions Date: Sun, 3 Jul 2016 01:21:08 +0000 Message-Id: <20160703012109.11097-2-e@80x24.org> In-Reply-To: <20160703012109.11097-1-e@80x24.org> References: <20160703012109.11097-1-e@80x24.org> List-Id: We don't need to care about client IPs anywhere. --- examples/public-inbox.psgi | 2 +- examples/varnish-4.vcl | 8 -------- script/public-inbox.cgi | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/examples/public-inbox.psgi b/examples/public-inbox.psgi index 11e2a6e..e97f917 100644 --- a/examples/public-inbox.psgi +++ b/examples/public-inbox.psgi @@ -29,7 +29,7 @@ builder { # Enable to ensure redirects and Atom feed URLs are generated # properly when running behind a reverse proxy server which - # sets X-Forwarded-For and X-Forwarded-Proto request headers. + # sets the X-Forwarded-Proto request header. # See Plack::Middleware::ReverseProxy documentation for details eval { enable 'ReverseProxy' }; $@ and warn diff --git a/examples/varnish-4.vcl b/examples/varnish-4.vcl index 7439679..999f954 100644 --- a/examples/varnish-4.vcl +++ b/examples/varnish-4.vcl @@ -15,14 +15,6 @@ backend default { } sub vcl_recv { - if (req.restarts == 0) { - if (req.http.x-forwarded-for) { - set req.http.X-Forwarded-For = - req.http.X-Forwarded-For + ", " + client.ip; - } else { - set req.http.X-Forwarded-For = client.ip; - } - } if (req.method != "GET" && req.method != "HEAD" && req.method != "PUT" && diff --git a/script/public-inbox.cgi b/script/public-inbox.cgi index 5b2aefe..2b7f737 100755 --- a/script/public-inbox.cgi +++ b/script/public-inbox.cgi @@ -20,7 +20,7 @@ my $app = builder { # Enable to ensure redirects and Atom feed URLs are generated # properly when running behind a reverse proxy server which - # sets X-Forwarded-For and X-Forwarded-Proto request headers. + # sets the X-Forwarded-Proto request header. # See Plack::Middleware::ReverseProxy documentation for details # enable 'ReverseProxy'; -- EW