-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
Add abillity to set path prefix #208
Conversation
Sorry, I know I've been slacking on this. Could you rebase this for recent master changes, please? |
@mkroman In addition to rebasing this, is there any chance I can convince you to make a test for this? :) |
It seems like the author of this PR has probably abandoned the effort, but I'd like to weigh in that I also have been trying to run miniserve behind a reverse proxy with a path prefix (which, unfortunately, is required). Any possibility that this is something you'd likely consider doing @svenstaro ? |
Sure, I'd still like for something like this to go in. Do you wanna take a stab at it, @bjeanes? |
Yeah I'd consider taking a stab on the weekend if I don't spend the time away from computer. But in full transparency, I opted to use |
Anyone interested in cleaning this up, rebasing it, and getting it in? :) |
I reimplemented this on top of the main branch #579 |
Closing in favor of #579. |
This PR should replace the
--random-route
argument with both a--path-prefix
argument and a conflicting--random-path-prefix
argument.I use miniserve behind a load-balancer under a specific path, so I need to control the path in miniserves web server, but while I can show the index page in a subdirectory, the links in the file index aren't relative to the current URL.
Here's an example - the indexed file links don't work because it assumes the relative URL path is
/
and it will link to the root domain accordingly (i.e. not under/pub/
)The
--random-path-prefix
argument should be a fully functional replacement to--random-route
. More testing may be required.