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
I ended with this script, however its not working, i don't get any 403 respond nor accept when it spoof the origin, all i get is connection reset, any suggestions?
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
} elseif { $origin_host contains "mydomain2.com" } {
pool $HTTP_pool
} elseif { $origin_host contains "mydomain3.com" } {
pool $HTTP_pool
} else {
HTTP::respond 403
}
} 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