Open letto4135 opened 2 years ago
The redirect service does not pattern match.
The example:
Redirect::new("/oh/hi/mark", "../../bye/mark");
literally sends the header Location: ../../bye/mark
back to the client. It is up to them to resolve this and make the follow-up request.
I can see the use case for a more dynamic redirect system that does match patterns. If this is what you are looking for, I'd suggest re-wording the issue and we can turn this into a feature request.
Regarding preserving body, it is irrelevant because this is not intended to be a proxy. It only serves redirect responses.
The docs show that you can do this
A nice thing to be able to do would be would be more dynamic redirects. Examples: