From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/2] examples: remove X-Forwarded-For mentions
Date: Sun, 3 Jul 2016 01:21:08 +0000 [thread overview]
Message-ID: <20160703012109.11097-2-e@80x24.org> (raw)
In-Reply-To: <20160703012109.11097-1-e@80x24.org>
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
next prev parent reply other threads:[~2016-07-03 1:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-03 1:21 [PATCH 0/2] varnish tweaks and such Eric Wong
2016-07-03 1:21 ` Eric Wong [this message]
2016-07-03 1:21 ` [PATCH 2/2] examples/varnish-4.vcl: comments and tweaks Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160703012109.11097-2-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).