Skip to content

Instantly share code, notes, and snippets.

@andresaquino
Created May 2, 2014 11:09
Show Gist options
  • Save andresaquino/281e8def10f413b3914f to your computer and use it in GitHub Desktop.
Save andresaquino/281e8def10f413b3914f to your computer and use it in GitHub Desktop.
f5-ir.bycontext-01
# triggered when a client connection is established
when HTTP_REQUEST {
# Is client IP address defined in the dg-mobilenetwork?
if { [ class match [IP::client_addr] equals $static::DGMobileNetwork ] } {
# Log accepted request
if { $static::AclNetworkDebug > 0 } {
log local0. " Client | [IP::client_addr]:[TCP::client_port] "
log local0. " Host | [HTTP::host] "
log local0. " URI | [HTTP::uri] "
}
# Is requested URL is contained in dg-restrictedcontext?
set urlpermited [ class match -value [HTTP::uri] starts_with $static::DGRestrictedContext ]
log local0. " Pattern | $urlpermited "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment