Forum Discussion
genseek_32178
Nimbostratus
Nov 06, 2013iRule Query
Hi Experts,
Can we write a irule that accepts/rejects request from say Opera and accepts requests only from Safari?
If yes, please provide the full irule, it would be very helpful.
tha...
IheartF5_45022
Nacreous
Nov 06, 2013This will give you an idea;-
switch -glob [HTTP::header User-Agent] {
"*AppleWebKit*Safari*" {
Do nothing - request allowed
}
default {
HTTP::respond 403 Content "Invalid client type"
return
}
}
genseek_32178
Nimbostratus
Nov 07, 2013thanks IheartF5 for the sample iRule. Please correct my understanting of it:
switch -glob [HTTP::header User-Agent] {
"*AppleWebKit*Safari*" {
Do nothing - request allowed
}----------------------------------------------------this part says alow requests from Safari to the pool
default {
HTTP::respond 403 Content "Invalid client type"
return
}
}-----------------------------------this part am not sure. Does it mean, request from any other browsr to send invalid request.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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