Forum Discussion
nitass
Aug 21, 2014Employee
can you try ADAPT::enable?
ADAPT::enable
https://devcentral.f5.com/wiki/iRules.ADAPT__enable.ashxe.g.
config
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
myrequestadapt {
context clientside
}
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 70
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm profile request-adapt myrequestadapt
ltm profile request-adapt myrequestadapt {
app-service none
defaults-from requestadapt
internal-virtual adapt
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
set path [HTTP::path]
log local0. "path=$path"
if { $path starts_with "/something" } {
ADAPT::enable disable
}
}
when HTTP_RESPONSE {
log local0. "path=$path"
}
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual adapt
ltm virtual adapt {
destination any:0
internal
ip-protocol tcp
mask any
profiles {
tcp { }
}
rules {
myrule
}
source 0.0.0.0/0
translate-address disabled
translate-port disabled
vlans-enabled
vs-index 71
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule myrule
ltm rule myrule {
when IVS_ENTRY_REQUEST {
log local0. ""
}
}
test
[root@ve11a:Active:In Sync] config tail -f /var/log/ltm
Aug 21 05:14:06 ve11a info tmm1[29362]: Rule /Common/qux : path=/
Aug 21 05:14:06 ve11a info tmm1[29362]: Rule /Common/myrule :
Aug 21 05:14:07 ve11a info tmm1[29362]: Rule /Common/qux : path=/
Aug 21 05:14:13 ve11a info tmm[29362]: Rule /Common/qux : path=/something
Aug 21 05:14:14 ve11a info tmm[29362]: Rule /Common/qux : path=/something