Forum Discussion
YannickWorldline
Nimbostratus
Mar 26, 2025Multiple http_request event with http::respond
Hello, I need to make two iRules on the same VS. The two are http_request triggered events with http::respond. When I'm doing this it's making a conflict between them. One is working well and...
YannickWorldline
Nimbostratus
Mar 31, 2025when HTTP_REQUEST {
set max_requests 200
set cookie [HTTP::cookie "SPECIAL_COOKIE"]
set timeout_delay 30
if { $cookie ne ""} {
set request_count [table incr session_count:$cookie 1]
if { $request_count == 1 } {
table set session_count:$cookie $request_count $timeout_delay
}
if { $request_count > $max_requests } {
set remaining_time [table timeout session_count:$cookie]
HTTP::respond 429 content "Request limit exceeded wait for $timeout_delay seconds. \nFor cookie: $cookie"
}
}
}
when HTTP_REQUEST {
if { [HTTP::uri] contains "/XXXX/XXXXXXXXXXXXX"
or [HTTP::uri] contains "/XXXXXXXXXXXXXX/XX"
or [HTTP::uri] contains "/XXXXX/XXXX"
or [HTTP::uri] contains "/XXXXX/XXXX"
or [HTTP::uri] contains "/XXXXXXXXX"
or [HTTP::uri] matches_regex {^/XXXXX.*\.XXXX$}}
{
set Custom_blocking_page [ifile get "/XXXXXXX"]
HTTP::respond 410 content $Custom_blocking_page
return
} return
}
This is the two iRule I have
YannickWorldline
Nimbostratus
Mar 31, 2025PS: I don't want to combine them in one iRule
- zamroni777Mar 31, 2025
MVP
use priority to ensure certain irules execution order
- YannickWorldlineMar 31, 2025
Nimbostratus
Even with priority I have the same error, either the first one in first or in second place
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