The Wayback Machine - https://web.archive.org/web/20201107175639/https://github.com/http-party/http-server/issues/661
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

Use relative paths in directory listing? #661

Open
ahayes opened this issue Oct 30, 2020 · 0 comments
Open

Use relative paths in directory listing? #661

ahayes opened this issue Oct 30, 2020 · 0 comments

Comments

@ahayes
Copy link

@ahayes ahayes commented Oct 30, 2020

Steps to reproduce the issue, if applicable. Include the actual command and output and/or stack trace.

Thanks for http-server.

When serving a folder of files/paths using http-server, while it is bring reverse-proxied by NGINX or Apache, the hard-coding of absolute paths (leading "/") in hrefs makes life difficult.

What did you expect to happen?

I would expect relative URL paths to the files/folders in the dynamic index output.

If the issue is a feature request, what is the motivation / use case for it?

Using Apache or NGINX to proxy is very common. The configuration is relatively simple if the application being proxied does not make assumptions about where it resides. When applications return URLs with leading slashes, the proxy configuration gets much more complicated, error prone, and expensive.

Tell us about your environment

  • exact http-server version:
    0.12.3
  • Node version:
    v8.17.0
  • Platform:
    smartos
    Other information (related issues, suggestions for a fix, etc):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.