Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

实现和 nginx proxy_redirect 功能等价的 wasm 插件(Implement A wasm plugin that the functional equivalent of nginx proxy_redirect) #61

Open
dspo opened this issue Nov 18, 2022 · 1 comment

Comments

@dspo
Copy link
Collaborator

dspo commented Nov 18, 2022

Why do you need it?

Is your feature request related to a problem? Please describe in details

我有如下的路由

[{
    "match": {
        "PathSpecifier": {
            "Prefix": "/web/"
        }
    },
    "Action": {
        "Route": {
            "ClusterSpecifier": {
                "Cluster": "my-web"
            },
            "prefix_rewrite": "/",
            "HostRewriteSpecifier": {
                "AutoHostRewrite": {}
            }
        }
    }
},
{
    "match": {
        "PathSpecifier": {
            "Prefix": "/web"
        }
    },
    "Action": {
        "Route": {
            "ClusterSpecifier": {
                "Cluster": "my-web"
            },
            "prefix_rewrite": "/",
            "HostRewriteSpecifier": {
                "AutoHostRewrite": {}
            }
        }
    }
}]

假设请求 {gateway-domain}/web/abc , 上游服务 my-web 返回 302 Found location: /abc/ . 此时如果 envoy 不处理该响应的话, 浏览器就会访问 {gateway-domain}/abc/ 了.

对标 Nginx http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_redirect

How could it be?

A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.

envoy 要么内部处理该重定向, 自动请求新的地址, 将正确结果返回客户端, 要么修改 location 字段后再返回给客户端.

Other related information

Add any other context or screenshots about the feature request here.

@johnlanni johnlanni changed the title 捕获上游 HTTP Status 302 Found 并内部处理或修改 location 实现和 nginx proxy_redirect 功能等价的 wasm 插件(Implement A wasm plugin that the functional equivalent of nginx proxy_redirect) Nov 30, 2022
@johnlanni johnlanni added this to the 0.6.0 milestone Nov 30, 2022
@johnlanni johnlanni removed the help wanted Extra attention is needed label Dec 2, 2022
@johnlanni johnlanni modified the milestones: 0.6.0, 0.7.0 Feb 17, 2023
@johnlanni johnlanni modified the milestones: 0.7.0, backlog Mar 17, 2023
@johnlanni johnlanni added the help wanted Extra attention is needed label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

3 participants