From 5e14b8e68483ab412b4a3ae1a62429237143b89b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 3 Jul 2016 01:04:10 +0000 Subject: [PATCH] examples: remove X-Forwarded-For mentions 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 11e2a6e7..e97f917f 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 7439679d..999f9542 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 5b2aefe2..2b7f737d 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'; -- 2.44.0