implement path replacing option
This commit is contained in:
parent
6365fe298f
commit
a0aed6d848
9 changed files with 89 additions and 56 deletions
|
|
@ -56,6 +56,12 @@ upstream_options = ["override_host"]
|
|||
# Non-default destination in "localhost" app, which is routed by "path"
|
||||
[[apps.localhost.reverse_proxy]]
|
||||
path = '/maps'
|
||||
# For request path starting with "/maps",
|
||||
# this configuration results that any path like "/maps/org/any.ext" is mapped to "/replacing/path1/org/any.ext"
|
||||
# by replacing "/maps" with "/replacing/path1" for routing to the locations given in upstream array
|
||||
# Note that unless "path_replaced_with" is specified, the "path" is always preserved.
|
||||
# "path_replaced_with" must be start from "/" (root path)
|
||||
replace_path = "/replacing/path1"
|
||||
upstream = [
|
||||
{ location = 'www.bing.com', tls = true },
|
||||
{ location = 'www.bing.co.jp', tls = true },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue