Forum Discussion
Vova_1985_18320
May 28, 2015Nimbostratus
iRule based on domain
Hi im looking for a way to accept traffic with * expression, is it possible?
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] eq "*.example.com*"} {
pool $HTTP_pool
} el...
Vova_1985_18320
May 28, 2015Nimbostratus
Thank you for your time, however i don't understand how to fit in in my rule.. maybe someone can help me to write it correctly? Maybe i can do it simpler like this?
when HTTP_REQUEST {
if { [HTTP::header exists Origin] } {
set origin_host [HTTP::header Origin]
}
}
when HTTP_RESPONSE {
if { [info exists origin_host] } {
if { $origin_host contains "mydomain1.com" } {
pool $HTTP_pool
}elsif{
{ $origin_host contains "mydomain2.com" } {
pool $HTTP_pool
}elsif{
{ $origin_host contains "mydomain3.com" } {
pool $HTTP_pool
} else {
HTTP::respond 403
}
}
}
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