Forum Discussion
Block Irule
Hi Guys,
i have written an irule in order to block some specific user agents
when HTTP_REQUEST {
if {[class match [string tolower [HTTP::header "User-Agent"]] contains Blocked_Users]}{
log local0. "Request from ip: [IP::client_addr] - User-Agent: [HTTP::header User-Agent] to: [HTTP::host] [HTTP::uri]"
drop
}
}
and i get logs like this:
TCL error: /Common/<http_request> - Can't call after responding - ERR_NOT_SUPPORTED (line 1) invoked from within "HTTP::header "User-Agent""</http_request></131>
I would like to know what does this mean more precisily , if the traffic is passing anyway even if its part of the blocked DG, does irule has any error or something .
Many thnx,
Daniel
Hi Daniel,
Is there any other iRule binded on the virtual server?
TCL error: ERR_NOT_SUPPORTED after upgrade to version 14.1.0 or later
https://my.f5.com/manage/s/article/K23237429when HTTP_REQUEST { if { [HTTP::has_responded] } { return } if { [class match [string tolower [HTTP::header "User-Agent"]] contains Blocked_Users] } { log local0. "Request from ip: [IP::client_addr] - User-Agent: [HTTP::header User-Agent] to: [HTTP::host] [HTTP::uri]" drop return } }
Hello,
Are you assinging another irules on the same virtual server? Also, can you share how did you create the data group?
There is a post mentioning the a similar error which is:
"Can't call after responding - ERR_NOT_SUPPORTED (line 1) invoked from within"
Thanks,
suguruGeto - If your post was solved it would be helpful to the community to select *Accept As Solution*.
Thanks for being part of our community.
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