using environment variable

Hello Folks,

I want to use the environment as a variable in my HTTPProxyConnection basePath declaration, as I'm doing path based routing from a load balancer. ie, I use /dev/test and /qa/test for for some test proxies, but it'd be nice to just use /${ENV}/test instead. Is this something I need to reference in the pre-flow?

Solved Solved
0 2 312
1 ACCEPTED SOLUTION

Nope, you can't do that. You cannot reference and environment or context variable in your basepath.

You CAN use wildcards in the API PRoxy basepath.

Here's the relevant documentation.

You would need to extend the API proxy to validate the wildcard segment. to ensure that the "path element" has a legal value. You could do that with regex or js or... ?

View solution in original post

2 REPLIES 2

Nope, you can't do that. You cannot reference and environment or context variable in your basepath.

You CAN use wildcards in the API PRoxy basepath.

Here's the relevant documentation.

You would need to extend the API proxy to validate the wildcard segment. to ensure that the "path element" has a legal value. You could do that with regex or js or... ?

that works, thanks!