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

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

Open
instcode opened this issue Jan 6, 2025 · 1 comment
Open
Labels
area/http enhancement Feature requests. Not bugs or questions. help wanted Needs help!

Comments

@instcode
Copy link

instcode commented Jan 6, 2025

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.

@instcode instcode added the triage Issue requires triage label Jan 6, 2025
@zuercher zuercher added enhancement Feature requests. Not bugs or questions. area/http help wanted Needs help! and removed triage Issue requires triage labels Jan 6, 2025
@zuercher
Copy link
Member

zuercher commented Jan 6, 2025

Per the docs, Envoy only supports fully qualified URLs at the moment. I've not looked closely, but It should be possible to implement a change to handle relative URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/http enhancement Feature requests. Not bugs or questions. help wanted Needs help!
Projects
None yet
Development

No branches or pull requests

2 participants