Security Irules 101: You can't always get what you want.. or can you?
Published Nov 08, 2014
Version 1.0Was this article helpful?
Indeed! The data groups listed above are just simple examples. To include the OPTIONS method, I'd do either ( Beware,off the cuff code below:)
if { string tolower [HTTP::method][ contains "OPTIONS" } {
log local0. " So, you want to see my options eh? How bout no?"
HTTP::respond 405 content [subst $static::Servers]
}
or:
when HTTP_RESPONSE {
if {HTTP::header exists Allows} {
HTTP::header replace Allows "PUT, POST, OPTIONS"
}
Could also maybe have the data group list build the OPTIONS list into a variable and send that as the replacement header.
Just an idea.
-joshm