You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for the late response, I miss the notification. So, we already have implemented the wildcard matching pattern using or not path prefix, equals or regex. However, we do not have a redirect feature yet.
The redirection itself is quite straightforward, but I'm not quite sure about the integration with the tooling: command line, config.toml, protobuf messages...
We should also decide what exactly are the capabilities of this feature. I don't know how it is done in other reverse proxies, but can we only change the authority? Should we be able to change the path? Is it a simple replacement or should we handle wildcards (*.domain.com -> *.domain2.com), if so what about regexes?
Hi @beckend, @Walker-00,
I am currently working on a URL rewriting and redirection features and was wondering if a system like the one proposed in issue #1161 would meet your needs. Please let me know your thoughts!
Partial-status update: 301 (RedirectPolicy::Permanent) and 401 (RedirectPolicy::Unauthorized) are implemented on main per-frontend, with optional rewrite_host / rewrite_path / rewrite_port shaping the Location URL and an optional redirect_template for a custom response body. Configuration shape:
Documented under doc/configure.md (Frontend redirect, URL rewrite, and custom headers section) and exercised in e2e/src/tests/redirect_rewrite_auth_tests.rs.
Still missing on main:
RedirectPolicy::Temporary → 302
A 308 variant (whether named RedirectPolicy::PermanentRedirect or as a distinct enum value)
Both extensions touch the same surface: the RedirectPolicy enum in command/src/command.proto, the case-insensitive parser in command/src/config.rs, the dispatch arm in lib/src/protocol/mux/router.rs::route_from_request, and the 301 arm of the answer engine at lib/src/protocol/kawa_h1/answers.rs::HttpAnswers::template. Mostly mechanical — happy to take the contribution if anyone wants to pick it up. Leaving this open as the tracking issue for the 302 / 308 work.
Activity
FlorentinDUBOIS commentedon Oct 25, 2023
Hello,
Could give us more details about what you want to achieve and your need?
beckend commentedon Oct 25, 2023
here is something from envoy, I hope this is clear
Walker-00 commentedon Jul 15, 2024
@FlorentinDUBOIS I think it's something like matching subdomain request and route to the specific port or url, and I also needing that
FlorentinDUBOIS commentedon Oct 14, 2024
Sorry for the late response, I miss the notification. So, we already have implemented the wildcard matching pattern using or not path prefix, equals or regex. However, we do not have a redirect feature yet.
FlorentinDUBOIS commentedon Oct 14, 2024
@Wonshtrum is the redirect feature easy to implement?
Walker-00 commentedon Oct 15, 2024
should implement that feature, waiting for it.
Wonshtrum commentedon Oct 18, 2024
The redirection itself is quite straightforward, but I'm not quite sure about the integration with the tooling: command line, config.toml, protobuf messages...
We should also decide what exactly are the capabilities of this feature. I don't know how it is done in other reverse proxies, but can we only change the authority? Should we be able to change the path? Is it a simple replacement or should we handle wildcards (
*.domain.com->*.domain2.com), if so what about regexes?Wonshtrum commentedon Dec 11, 2024
Hi @beckend, @Walker-00,
I am currently working on a URL rewriting and redirection features and was wondering if a system like the one proposed in issue #1161 would meet your needs. Please let me know your thoughts!
FlorentinDUBOIS commentedon Apr 30, 2026
Partial-status update: 301 (
RedirectPolicy::Permanent) and 401 (RedirectPolicy::Unauthorized) are implemented onmainper-frontend, with optionalrewrite_host/rewrite_path/rewrite_portshaping theLocationURL and an optionalredirect_templatefor a custom response body. Configuration shape:Documented under
doc/configure.md(Frontend redirect, URL rewrite, and custom headerssection) and exercised ine2e/src/tests/redirect_rewrite_auth_tests.rs.Still missing on
main:RedirectPolicy::Temporary→ 302RedirectPolicy::PermanentRedirector as a distinct enum value)Both extensions touch the same surface: the
RedirectPolicyenum incommand/src/command.proto, the case-insensitive parser incommand/src/config.rs, the dispatch arm inlib/src/protocol/mux/router.rs::route_from_request, and the301arm of the answer engine atlib/src/protocol/kawa_h1/answers.rs::HttpAnswers::template. Mostly mechanical — happy to take the contribution if anyone wants to pick it up. Leaving this open as the tracking issue for the 302 / 308 work.fix(router,mux,answers): close PR #1162 follow-up gaps on main
docs(upgrade): structural draft for v1.1.x → v2.0.0 migration
test(e2e): full 4-cell matrix coverage for 302 + 308 redirects + rewr…
feat(redirect): add 302 (Found) and 308 (Permanent Redirect) policies
docs(upgrade): add Wave 2 sections — sd_notify, cert chain dedup, 302…
test(e2e): full 4-cell matrix coverage for 302 + 308 redirects + rewr…
fix(router,mux,answers): close PR sozu-proxy#1162 follow-up gaps on main
docs(upgrade): structural draft for v1.1.x → v2.0.0 migration
feat(redirect): add 302 (Found) and 308 (Permanent Redirect) policies
docs(upgrade): add Wave 2 sections — sd_notify, cert chain dedup, 302…
test(e2e): full 4-cell matrix coverage for 302 + 308 redirects + rewr…