envoyproxy/envoy

[Question] How to change the relative redirect location to absolute url?

オープン

#37,883 opened on 2025/01/06

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)C++ (5,373 件のフォーク)batch import
area/httpenhancementhelp wanted

Repository metrics

Stars
 (27,997 個のスター)
PR merge metrics
 (平均マージ 8d) (30d で 378 merged PRs)

説明

Title: How to change the relative redirect location to absolute url?

Description:

I have an upstream server that responses a request with status code = 303 and a relative location such as: "/session/12345/status". Hence, when I use the following route config, the redirection failed with an error: "Internal redirect failed: invalid location...":

route:
    cluster: my_upstream
    auto_host_rewrite: true
    max_internal_redirects: 5
    internal_redirect_action: HANDLE_INTERNAL_REDIRECT
    internal_redirect_policy:
      max_internal_redirects: 5
      redirect_response_codes:
        - 303

Checking the document seems to require an absolute path for the location: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/http_connection_management#internal-redirects

Is there any work around for this? Thank you.

コントリビューターガイド