Rename Flow and Remove Suffix

Not applicable

Hi everyone !!

I try change the proxy names and set with other targets but when route rule its true i want remove suffix but the policy java script dont execute the java script policy is on target preflow.

6576-get.png

When send petition from Postman and the expresion its false the java script policy execute

6578-false.png

But when the expression its true i want that the policy java script execute but this dont work

6580-true.png

What is the problem if i want rename flows and this flows have other targets.

Thanks.

Regards.

0 1 300
1 REPLY 1

Not applicable

Even though you have the 2 route rules, they are using the same target endpoint. This means that the same policies are being executed, no matter which route rule was triggered. Instead of using the route rules, you could add the conditional statement into your step definition in the target preflow. Something like:

<PreFlow name="PreFlow">
  <Request>
    <Step>
      <Condition>
        (proxy.pathsuffix MatchesPath "/bp") and (request.verb = "POST")
      </Condition>
      <Name>RemoveSuffix</Name>
    </Step>
  </Request>
  <Response/>
</PreFlow>