IIS 7 and Above
Filtering based on X-FORWARDED-PROTO
Last post Jul 21, 2017 09:18 PM by bab5470
Jul 21, 2017 09:18 PM|bab5470|LINK
We've setup a custom field called X-FORWARDED-PROTO which lists the protocol (http or https) that a request came in on. This header is set by our load balancer which sits in front of IIS.
We'd like to setup an IIS advanced logging filter to filter http and https traffic into different logs. Why? Because we're in the process of converting our website from http -> https and we'd like to see any http calls. I believe apache does this by default.
Anyway I try and define a custom filter:
('Proto' Equals 'https') for one log definition
('Proto' Equals 'http') for a second log definition
Yet when I check my logs - they're empty. I found another user trying to accomplish something similar and having issues but no response: https://forums.iis.net/t/1216174.aspx?IIS+7+Advanced+Logging+Filters+with+Regex
I'm hoping someone else has done this and can explain what they did or alternatively if there's a Microsoft dev watching this forum - can you tell me why this isn't working and/or how I could get it working?