uwebe
asked on
ISAPIRewrite - rewriteHeader
Hi
Is there a way to rewrite REMOTE_ADDR header variable with HTTP_X_FORWARDED_FOR header variable. The trick is to tell the IIS actual client IP, which was masked by the proxy or firewall.
The use would be to write proper c-ip to W3C extended log to use with statistics software.
Thank you
Gasper Markic
Is there a way to rewrite REMOTE_ADDR header variable with HTTP_X_FORWARDED_FOR header variable. The trick is to tell the IIS actual client IP, which was masked by the proxy or firewall.
The use would be to write proper c-ip to W3C extended log to use with statistics software.
Thank you
Gasper Markic
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi uwebe, missed your last comment.
Does the accpet mean that the above code worked out ok?
Cheers.
Does the accpet mean that the above code worked out ok?
Cheers.
ASKER
Hi meverest
Well I am still working on, but you sure gave me a new aspect to look for and I must say it was worth the points. I just posted another question about compiling the fragment. Maybe you can help me there too.
Best regards
Gasper
Well I am still working on, but you sure gave me a new aspect to look for and I must say it was worth the points. I just posted another question about compiling the fragment. Maybe you can help me there too.
Best regards
Gasper
cool - OK, cheers!
ASKER
DWORD CIsapiLoggerFilter::OnLog(
PHTTP_FILTER_LOG pLog)
{
char szBuffer[bufferSize] = "\0"; //NULL;
DWORD dwSize = bufferSize;
pCtxt->GetServerVariable("
if (strlen (szBuffer) > 0){
pLog->pszClientHostName = szBuffer;
}
return SF_STATUS_REQ_NEXT_NOTIFIC
}
I just have to get it working now.
Gasper