Switch to full style
Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems
Post a reply

How to add the x-forwarded-for header

Jul 07 18 5:06 am

Hi,
I am new to WinGate and am using it for Web Proxy, which is working fine. However, I need the Proxy server to add the X-Forwarded-For header in every HTTP request. I am unable to find anything regarding this in the documentation. Can someone please tell me how to configure WinGate so it puts the X-Forwarded-To header.

Re: How to add the x-forwarded-for header

Jul 07 18 8:36 am

Hi

normally X-Forwarded-For (XFF) is only added in 2 scenarios

1. Connecting upstream via another proxy to tell it what the original client IP is
2. Reverse proxy - to indicate to the server what the original client IP is

In scenario 1, this is configured on the "Connections" tab in the www proxy.
in scenario 2, this is configured in the general tab for a website in the "Web server' tab of the proxy if the site is set to reverse proxy.

Did you want XFF header in some other scenario? If for example you wanted to add it to all requests, you'd need to do that in script, e.g.

Request.Headers.Set("X-Forwarded-For", Session.ClientIp)

Adrien
Post a reply