How do you add a script target to a conditional flow?

Is there a way to add a script target to a conditional flow? I want to use node.js script only for a specific request. How can I do this?

Solved Solved
0 1 666
1 ACCEPTED SOLUTION

Like this - in your default proxy:

<RouteRule name="node">
	<Condition>(proxy.pathsuffix MatchesPath "/node")</Condition>
	<TargetEndpoint>node</TargetEndpoint>
</RouteRule>

<RouteRule name="default">
	<TargetEndpoint>default</TargetEndpoint>
</RouteRule>

Check this out: http://apigee.com/docs/api-services/reference/conditions-reference. Scroll down to "Routes" heading.

View solution in original post

1 REPLY 1

Like this - in your default proxy:

<RouteRule name="node">
	<Condition>(proxy.pathsuffix MatchesPath "/node")</Condition>
	<TargetEndpoint>node</TargetEndpoint>
</RouteRule>

<RouteRule name="default">
	<TargetEndpoint>default</TargetEndpoint>
</RouteRule>

Check this out: http://apigee.com/docs/api-services/reference/conditions-reference. Scroll down to "Routes" heading.