Added path_prefix and strip_path_prefix

This commit is contained in:
Andrew Kelley
2025-05-13 19:31:54 -04:00
parent 031f55ecf7
commit 1331e7b9c7
2 changed files with 13 additions and 0 deletions

View File

@@ -74,6 +74,17 @@ proxy:
# How long to wait for requests to complete before timing out, defaults to 30 seconds:
response_timeout: 10
# Path-based routing
#
# For applications that split their traffic to different services based on the request path,
# you can use path-based routing to mount services under different path prefixes.
path_prefix: '/api'
# By default, the path prefix will be stripped from the request before it is forwarded upstream.
# So in the example above, a request to /api/users/123 will be forwarded to web-1 as /users/123.
# To instead forward the request with the original path (including the prefix),
# specify --strip-path-prefix=false
strip_path_prefix: false
# Healthcheck
#
# When deploying, the proxy will by default hit `/up` once every second until we hit