Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloak.vcl removes X-Forwarded-For and X-Varnish on uncached content #24

Open
dsommers opened this issue Feb 3, 2014 · 1 comment
Open

Comments

@dsommers
Copy link

dsommers commented Feb 3, 2014

I discovered that security.vcl's cloak.vcl removes X-Forwarded-For and X-Varnish.

I can understand the reasoning for doing this (making proxied connections more anonymous at the backend server), but it also creates a bigger burden when you are responsible for both backend and frontend servers (where the client won't be anonymous because you control the whole chain). It simply makes both debugging and logging harder.

The workaround solution for this is simple:

diff --git a/vcl/modules/cloak.vcl b/vcl/modules/cloak.vcl
index 5a7bda7..0988022 100644
--- a/vcl/modules/cloak.vcl
+++ b/vcl/modules/cloak.vcl
@@ -94,6 +94,6 @@ sub vcl_recv {
 # Try to obscure the client-to-backend comms as well
 sub vcl_miss {
    # remove bereq.http.User-agent;
-   remove bereq.http.X-Forwarded-For;
-   remove bereq.http.X-Varnish;
+   # remove bereq.http.X-Forwarded-For;
+   # remove bereq.http.X-Varnish;
 }

Please consider using this as a standard setup ... or at least more clearly document that these variables are removed and how to re-enable them.

@comotion
Copy link
Owner

comotion commented Feb 3, 2014

Your patch kind of defeats the purpose of cloak.vcl. I would recommend disabling the cloak module in your setup. That might be the default in VSF, https://github.com/comotion/VSF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants