Forum Discussion
helsana
Nimbostratus
Aug 21, 2014define RequestAdapt Profile in iRule
Hi,
I'm working on a ICAP integration for some URLs. How can I set the Request Adapt Profile dynamicaly in the iRule?
Thanks
2 Replies
- nitass
Employee
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 - rahulpr_134840
Nimbostratus
Hi Both
do we need to associate the Request adapt profile to the Standard Vs or Irule will help to associate dynamically
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