Http redirect 如何使用代理重定向
我们使用特使代理作为入口HTTP代理。现在我们想要从Http redirect 如何使用代理重定向,http-redirect,envoyproxy,Http Redirect,Envoyproxy,我们使用特使代理作为入口HTTP代理。现在我们想要从https:/our\u domain/重定向到https:/our\u domain/static/index.html。 例如,到目前为止,我们所有的尝试都失败了 routes: - match: path: "/" redirect: { path_redirect: "/static/index.html"
https:/our\u domain/
重定向到https:/our\u domain/static/index.html
。
例如,到目前为止,我们所有的尝试都失败了
routes:
- match:
path: "/"
redirect: { path_redirect: "/static/index.html" }
- match:
prefix: "/"
route:
prefix_rewrite: "/"
cluster: our_cluster
如何为此用例配置路由?请不要使用Lua解决方案。问题在于特使代理位于tls终止代理的后面。因此,重定向总是使用http方案,而tls终止代理不提供http方案 解决办法是 https\u重定向 (bool)URL的方案部分将替换为“https” 因此,必须确定正确的路线
routes:
- match:
path: "/"
redirect:
https_redirect: true
path_redirect: "/static/index.html"
- match:
prefix: "/"
route:
cluster: our_cluster