Conversation
|
Hey, thanks for the PR! I think we should have something like this (as indicated in my last comment on #413), but.. naming is hard. I've been considering something like I guess since axum So if you don't care much about the naming or what exactly the API looks like, I would recommend you rename |
|
Thanks for the review
You could use a workaround like putting the files at A separate option to strip an arbitrary prefix from the file path could also be added if that workaround doesn't work for someone. (Maybe
I've renamed it to |
|
I don't know why the cargo-hack test is failing, it seems unrelated to me. |
Motivation
Currently
ServeDirassumes that the files are served from/, which breaks trailing slash redirects in some configurations like a reverse proxy that redirects/somePath/*to theServeDirserver or a scenario whereaxum::Router::nest_serviceis used.Solution
This allows the user to pass in a string that is prepended to the redirect path.
edit(jplatte): Closes #413