envoyproxy/envoy

Support dynamic host rewrite

Open

#16,507 建立於 2021年5月14日

在 GitHub 查看
 (7 留言) (0 反應) (0 負責人)C++ (5,373 fork)batch import
enhancementhelp wanted

倉庫指標

Star
 (27,997 star)
PR 合併指標
 (平均合併 8天) (30 天內合併 378 個 PR)

描述

If you are reporting any crash or any potential security issue, do not open an issue in this repo. Please report the issue via emailing envoy-security@googlegroups.com where the issue will be triaged appropriately.

Description:

Describe the issue. We would like to use Envoy to do a dynamic host rewrite and route the request to different endpoint, What we want is:

  1. fetch part of request endpoint as env variable $var1
  2. fetch value of header "x-google-service-name" as $var2
  3. using customized logic to construct the endpoint: $var1.$var2.internal.google.com and route the request
  4. return the response form upstream cluster back to customer Example: We have a request customerId123.google.com from customer along with a header x-google-service-name="sampleService" and want to construct a new endpoint customerId123.sampleService.internal.google.com and route the request using Envoy.

I've walked through Envoy docs and found dynamic forward proxy and Lua filter might be helpful, but still wanna know how will Envoy support fetch value from host/header and dynamically define as a variable?

Any suggestion is appreciated. Thanks.

[optional Relevant Links:]

Any extra documentation required to understand the issue.https://github.com/envoyproxy/envoy/issues/8768

貢獻者指南