Forum Discussion
hoolio
Cirrostratus
Jun 13, 2006Using PROFILE::httpclass to get HTTP class configuration info
Hello,
I'm trying to understand how to access HTTP class characteristics and then use a rule to select between a set of HTTP classes based on the filters of the classes.
I found in the profile...
unRuleY_95363
Jun 14, 2006Historic F5 Account
You don't need to actually select a class to make this work. If you look at the _ASM_clientside rule, all you really need to do is replicate the code that happens in the HTTP_CLASS_SELECTED event.
So, what I would probably do is make two HTTP classes (one with ts_enabled, but that won't actually match anything - this is needed to properly configure the virtual for routing to ASM) and then another class that actually matches everything but does not have ts_enabled (it must have ts disabled so that your replacement rule will function correctly with the _ASM rules). Then create a rule that copies just the HTTP_CLASS_SELECTED event from the ASM clientside rule. Add your selection logic to the top of that event and sets tmm_ts_httpclass_selected to 1 or 0 depending on whether you want to go through ASM or not. Then replace the first "if {[PROFILE::httpclass [HTTP::class] ts_enabled] == 1}" check with a simpler "if {$tmm_ts_httpclass_selected}" check (which now bases the decision to route to ASM on the logic you just added to the top of the rule. That should be it.
Good luck.
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
