I'm using an IIS server behind the nice "Cloudflare" reverse proxy.
This reverse proxy farm exposes a HTTP header to my server, namely HTTP_CF_CONNECTING_IP. It contains the IP that connects to Cloudflare, so I can actually see who's connecting.
Now I of course want to log these IPs. Cloudflare has a little web.config script that uses the IIS REWRITE option to change the REMOTE_ADDR server variable.
<rules>
<clear />
<rule name="Replace REMOTE_ADDR with CF_CONNECTING_IP" enabled="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_CF_CONNECTING_IP}" pattern="\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" />
</conditions>
<serverVariables>
<set name="REMOTE_ADDR" value="{HTTP_CF_Connecting_IP}" />
</serverVariables>
<action type="None" />
</rule>
</rules>
Does this actually affect logging? Also: Does this affect what I get when I look at the request IP when running, for example, an ASP.NET application or a PHP script?
If it does, why does this exist: http://devcentral.f5.com/weblogs/Joe/archive/2009/12/23/x-forwarded-for-http-module-for-iis7-source-included.aspx
When we can just use IIS rewrite, what advantage does THIS get me?