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

Don't set X-Forwarded-For in vlc_recv for v4 #1365

Merged
merged 1 commit into from
Sep 12, 2018

Conversation

rbrown
Copy link
Contributor

@rbrown rbrown commented Feb 20, 2017

According to https://varnish-cache.org/docs/5.0/whats-new/upgrading-4.0.html#x-forwarded-for-is-now-set-before-vcl-recv

In many cases, people unintentionally removed X-Forwarded-For when
implementing their own vcl_recv. Therefore it has been moved to before
vcl_recv, so if you don't want an IP added to it, you should remove it
in vcl_recv.

Leaving the fragment in vcl_recv results in the proxy ip being inserted
twice.

According to https://varnish-cache.org/docs/5.0/whats-new/upgrading-4.0.html#x-forwarded-for-is-now-set-before-vcl-recv

> In many cases, people unintentionally removed X-Forwarded-For when
> implementing their own vcl_recv. Therefore it has been moved to before
> vcl_recv, so if you don't want an IP added to it, you should remove it
> in vcl_recv.

Leaving the fragment in vcl_recv results in the proxy ip being inserted
twice.
@m-overlund
Copy link

Applied the fix and seems to work as intended.
The IP does not appear twice any longer.

@miguelbalparda miguelbalparda self-assigned this Aug 27, 2018
@miguelbalparda miguelbalparda merged commit a370d76 into nexcess:devel Sep 12, 2018
@miguelbalparda
Copy link
Contributor

Sorry for the late turnaround @rbrown, this is being merged now. Thanks!!

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

Successfully merging this pull request may close these issues.

3 participants