F5 Sites
  • F5.com
  • LearnF5
  • NGINX
  • MyF5
  • Partner Central
Contact
  • Under Attack?
  • F5 Support
  • DevCentral Support
  • F5 Sales
  • NGINX Sales
  • F5 Professional Services
Brand LogoSkip to content
Forums
CrowdSRC
Articles
Groups
EventsSuggestionsHow Do I...?
RegisterSign In
  1. DevCentral
  2. Articles
  3. Technical Articles

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.0
101
adn
basic
BIG-IP
dev
getting started
news
security
tech tip
Joe_Pruitt's avatar
Joe_Pruitt
Joined September 22, 2004
View Profile
Joe_Pruitt's avatar
Joe_Pruitt
Joined September 22, 2004
View Profile
Sabir_Alvi's avatar
Sabir_Alvi
Icon for Altocumulus rankAltocumulus
Sep 01, 2018

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
}

ABOUT DEVCENTRAL

DevCentral NewsTechnical ForumTechnical ArticlesTechnical CrowdSRCCommunity GuidelinesDevCentral EULAGet a Developer Lab LicenseBecome a DevCentral MVP

RESOURCES

Product DocumentationWhite PapersGlossaryCustomer StoriesWebinarsFree Online CoursesF5 CertificationLearnF5 Training

SUPPORT

Manage SubscriptionsProfessional ServicesProfessional ServicesCreate a Service RequestSoftware DownloadsSupport Portal

PARTNERS

Find a Reseller PartnerTechnology AlliancesBecome an F5 PartnerLogin to Partner Central

F5 logo©2024 F5, Inc. All rights reserved.
TrademarksPoliciesPrivacyCalifornia PrivacyDo Not Sell My Personal Information