Skip to content

Instantly share code, notes, and snippets.

@fishnix
Created March 14, 2012 18:56
Show Gist options
  • Select an option

  • Save fishnix/2038656 to your computer and use it in GitHub Desktop.

Select an option

Save fishnix/2038656 to your computer and use it in GitHub Desktop.
exchange logging irule
when HTTP_REQUEST priority 100 {
switch -glob -- [string tolower [HTTP::path]] {
"/ews*" {
if { [HTTP::header exists "User-Agent"] } {
log local0. "EWS traffic,[IP::client_addr],[HTTP::header User-Agent]"
} else {
log local0. "EWS traffic,[IP::client_addr],No User-Agent"
}
if { [HTTP::header exists "Authorization"] } {
log local0. "EWS traffic,[IP::client_addr],Authorization Header"
}
if { [HTTP::cookie exists "exchangecookie"] } {
log local0. "EWS traffic,[IP::client_addr],[HTTP::cookie exchangecookie]"
}
}
default {
return
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment