Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
dfeb3205
Commit
dfeb3205
authored
Mar 08, 2018
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document the effect of UDS on X-Forwarded-For in "Upgrading to 6.0".
parent
d15c9bdb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
upgrading-6.0.rst
doc/sphinx/whats-new/upgrading-6.0.rst
+23
-0
No files found.
doc/sphinx/whats-new/upgrading-6.0.rst
View file @
dfeb3205
...
@@ -183,6 +183,29 @@ of these changes:
...
@@ -183,6 +183,29 @@ of these changes:
* Set ``req.http.Host`` to a distinct value if it is absent before
* Set ``req.http.Host`` to a distinct value if it is absent before
``vcl_hash`` is entered.
``vcl_hash`` is entered.
X-Forwarded-For
---------------
Varnish automatically appends the value of ``client.ip`` to the
``X-Forwarded-For`` request header that is passed on to backends, or
it creates the header with that value if it is not already present in
the client request.
If the client request is received over a UDS listener and the PROXY
protocol is not used, then ``0.0.0.0`` will be added to
``X-Forwarded-For``. If you prefer, you can change that in VCL::
sub vcl_backend_fetch {
# Assuming that server.identity has been set to an IP
# address with the -i command-line argument.
set bereq.http.X-Forwarded-For
= regsub(bereq.http-X-Forwarded-For, "0.0.0.0$", server.identity);
# ...
}
Again, this is probably not a concern if ``client.ip`` is set via the
PROXY protocol.
VCL variables
VCL variables
~~~~~~~~~~~~~
~~~~~~~~~~~~~
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment