How to inject a variable placeholder ${}
in the spring gateway filters configuration?
foo:
bar:
uri: /coucou
spring:
cloud:
gateway:
routes:
- id: prefixpath_route
uri: https://example.org
filters:
- PrefixPath=$\\{foo.bar.uri}
NB:
$\{foo.bar.uri}
and ${foo.bar.uri}
As @spencergibb highlighted, it's working by using args
subproperty:
filters:
- name: PrefixPath
args:
prefix: ${foo.bar.uri}
see gist.github.com/spencergibb/873f239529f79cb784d4eab3a9ddc4a6