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

Closed
ahayes opened this issue Oct 30, 2020 · 2 comments · Fixed by #732
Closed

Use relative paths in directory listing? #661

ahayes opened this issue Oct 30, 2020 · 2 comments · Fixed by #732
Labels
good first issue Hacktoberfest Attract attention to this issue

Comments

@ahayes
Copy link

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 being 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):
@github-actions
Copy link

This issue has been inactive for 180 days

@thornjad
Copy link
Member

I think this is a valid point and switching to relative paths shouldn't interfere with functionality at all

@thornjad thornjad removed the stale label Aug 17, 2021
@thornjad thornjad added the Hacktoberfest Attract attention to this issue label Sep 30, 2021
boarwell added a commit to boarwell/http-server that referenced this issue Sep 30, 2021
thornjad added a commit that referenced this issue Oct 1, 2021
Use relative paths in directory listing #661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Hacktoberfest Attract attention to this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants