Forum Discussion
Dan_103700
Nimbostratus
May 25, 2011IRule for Context-Specific ASM Error Page
I wrote a couple iRules to help provide some context to our users when they get dinged by the ASM. Basically, I wanted to pass in the URL of the page that generated the block, in addition to the "supp...
hoolio
Cirrostratus
May 25, 2011Hi Dan,
I haven't tested this, but could you use HTTP::respond from ASM_REQUEST_BLOCKING to replace the redirect?
when ASM_REQUEST_BLOCKING {
set redirectTo "http://www.domain.com/not_found.htm?$asm_query_string"
HTTP::respond 302 Location $redirectTo
}
Also make sure to validate the query string on your PHP app which displays the error text. At a minimum you could HTML encode any text you display back to the user to avoid a XSS vulnerability.
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects