fix(circleci): add api route prefix to proxy rewrite path

This commit is contained in:
Andrew Thauer
2020-09-26 06:06:47 -04:00
parent 8140f4ace6
commit 572abfe121
3 changed files with 3 additions and 9 deletions
+3 -3
View File
@@ -49,7 +49,7 @@ Each key under the proxy configuration entry is a route to match, below the
prefix that the proxy plugin is mounted on. It must start with a slash. For
example, if the backend mounts the proxy plugin as `/proxy`, the above
configuration will lead to the proxy acting on backend requests to
`/proxy/simple-example/...` and `/proxy/larger-example/v1/...`.
`/api/proxy/simple-example/...` and `/api/proxy/larger-example/v1/...`.
The value inside each route is either a simple URL string, or an object on the
format accepted by
@@ -74,6 +74,6 @@ except with the following caveats for convenience:
commonly useful value.
- If `pathRewrite` is not specified, it is set to a single rewrite that removes
the entire prefix and route. In the above example, a rewrite of
`'^/proxy/larger-example/v1/': '/'` is added. That means that a request to
`/proxy/larger-example/v1/some/path` will be translated to a request to
`'^/api/proxy/larger-example/v1/': '/'` is added. That means that a request to
`/api/proxy/larger-example/v1/some/path` will be translated to a request to
`http://larger.example.com:8080/svc.v1/some/path`.