![将所有传入路径参数附加到 proxy_pass URL](https://linux22.com/image/757513/%E5%B0%86%E6%89%80%E6%9C%89%E4%BC%A0%E5%85%A5%E8%B7%AF%E5%BE%84%E5%8F%82%E6%95%B0%E9%99%84%E5%8A%A0%E5%88%B0%20proxy_pass%20URL.png)
我想创建一个映射,这样,如果请求带有路径,some-path
则将其附加到proxy_pass
URL。例如如下所示:
location /hi/[some-path] {
proxy_pass https://mywebsite.com/[some-path]
}
有办法吗?可能吗?
Incoming Request:
https://foo.bar/hi/some-path/1/2/3
Proxy Passed To:
https://mywebsite.com/some-path/1/2/3