Forum Discussion
iRule Error when try to disable ACCESS in HTTP_REQUEST_DATA event
Can we disable APM profile in HTTP_REQUEST_DATA event?
when HTTP_REQUEST_DATA {
Parse XML Data
set xmluserdata [findstr [HTTP::payload] "" 10 ""]
set xmlpw [findstr $xmluserdata "" 10 end]
if {!([info exists "xmlpw"])} {}
unset xmlpwtmp
}
When I try ACCESS:: disable as follows: if {!([info exists "xmlpw"])} { ACCESS::disable} [command is not valid in current event context (HTTP_REQUEST_DATA)][ACCESS::disable]
I don't want to initiate APM module if password is empty.
- samstep
Cirrocumulus
You can't use ACCESS::disable in HTTP_REQUEST_DATA, it is not valid there.
It is only valid on HTTP_REQUEST
https://devcentral.f5.com/wiki/irules.access__disable.ashx
Perhaps you want to respond to the offending request with an error code and close the connection? Then you can use HTTP::respond which is valid in HTTP_REQUEST_DATA
https://devcentral.f5.com/wiki/irules.http__respond.ashx
Recent Discussions
Related Content
* 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