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
}
}