f5-appsvcs-extension icon indicating copy to clipboard operation
f5-appsvcs-extension copied to clipboard

Policy_Action tcl set-variable

Open zivvel opened this issue 5 years ago • 4 comments

Is your feature request related to a problem?

During iRule execution, need to be able to detect when a Policy_Condition was matched. Prior to AS3, we use a TCL set-variable action to accomplish this.

In the current case, we are inserting a prefix on HTTP::uri; we would normally do this:

actions {
  0 {
    http-uri
    replace
    path /
    value "tcl:[string replace [HTTP::uri] 0 0 /new_prefix/]"
  }
  1 {
    tcl
    set-variable
    expression 1
    name http_uri_rewritten
  }
}

Describe the solution you'd like

Implement TCL set-variable as a Policy_Action in AS3.

Describe alternatives you've considered

I don't know if this will work, and it's definitely not the way we want to do it, but we are playing with something like this:

"actions": [{
  "type": httpUri",
  "replace": {
    "value": "tcl:[string replace [HTTP::uri] 0 0 [set http_uri_rewritten /new_prefix/]]",
  }
}]

Additional context

We also need a Policy_Condition like http-uri not starts-with /new_prefix, but I see there are already 2 requests for that.

zivvel avatar Jan 07 '20 13:01 zivvel

Thank you for your feedback. I have copied your feature request to our internal product backlog as AUTOTOOL-1151.

dstokesf5 avatar Jan 24 '20 22:01 dstokesf5

Is there any update on this request?

walterk82 avatar Aug 19 '20 19:08 walterk82

Any news here?

walterk82 avatar Jan 27 '21 20:01 walterk82

We are looking to get this into the AS3 release coming in early April.

delgadillo22 avatar Jan 27 '21 21:01 delgadillo22