iRule Security 101 - #04 - Masking Application Platform
In this session of iRules Security 101, I'll show you how to hide your backend server application platform from the outside public. When you are browsing a website, you are likely to look at the URI...
Published Sep 07, 2007
Version 1.0Sabir_Alvi
Sep 01, 2018Altocumulus
Could you please provide me the syntax for second part of the iRule which involves payload if I have 3 file types masked in the first part of the iRule?
For ex.: .js, .dll, .asp - how do I write the below --
when HTTP_RESPONSE {
if { $orig_uri ends_with ".joe" } {
Ensure all of the HTTP response is collected
if { [HTTP::header exists "Content-Length"] } {
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 1000000
}
if { $content_length > 0 } {
HTTP::collect $content_length
}
}
if { [HTTP::header exists "Server" ] } {
HTTP::header replace "Server" "Joe's Awesome App Server"
}
}
when HTTP_RESPONSE_DATA {
set new_payload [string map {".asp" ".joe"} [HTTP::payload]]
HTTP::payload replace 0 [HTTP::payload length] $new_payload
}