我正在尝试重写服务的路径,同时在 kubernetes 上使用 nginx 入口保留浏览器 URL。
我需要的是这样的:
http://example.com/path=>http://servicehttp://example.com/path/bar=>http://service/barhttp://example.com/path/file.css=>http://service/file.css也就是说,使其/path成为上游服务器中的根(或某个不同的 url)。
从我在这里看到的,这是使用 proxy_pass 上的尾部斜杠来完成的,但 nginx ingress 似乎没有这个选项。
这可能是 nginx 入口吗?