Skip to content

Instantly share code, notes, and snippets.

@megamaced
Created October 4, 2017 13:47
Show Gist options
  • Save megamaced/70fb713e290d6d0aefd3ef80247e17d5 to your computer and use it in GitHub Desktop.
Save megamaced/70fb713e290d6d0aefd3ef80247e17d5 to your computer and use it in GitHub Desktop.
iRule to block any url not listed here
when HTTP_REQUEST {
if {! switch -glob [string tolower [HTTP::host]] {
"hostname1.domain.com" -
"hostname2.domain.com" -
"hostname3.domain.com"
}
log local0. "[HTTP::host] not allowed"
drop
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment