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

Add abillity to set path prefix #208

Closed
wants to merge 3 commits into from
Closed

Conversation

mkroman
Copy link

@mkroman mkroman commented Oct 13, 2019

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.

@svenstaro
Copy link
Owner

Sorry, I know I've been slacking on this. Could you rebase this for recent master changes, please?

@svenstaro
Copy link
Owner

@mkroman In addition to rebasing this, is there any chance I can convince you to make a test for this? :)

@bjeanes
Copy link

bjeanes commented Oct 14, 2020

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 ?

@svenstaro
Copy link
Owner

Sure, I'd still like for something like this to go in. Do you wanna take a stab at it, @bjeanes?

@bjeanes
Copy link

bjeanes commented Oct 16, 2020

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 rclone serve http with its base path option since leaving my comment so my immediate need has diminished. However I definitely would like the tgz/zip feature for this use case, so there is still some motivation :)

@svenstaro
Copy link
Owner

Anyone interested in cleaning this up, rebasing it, and getting it in? :)

@Jikstra
Copy link
Contributor

Jikstra commented Aug 27, 2021

I reimplemented this on top of the main branch #579

@svenstaro
Copy link
Owner

Closing in favor of #579.

@svenstaro svenstaro closed this Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants