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

Can I just use serve like a static server without file listing? #92

Closed
miranquil opened this issue Jul 2, 2019 · 2 comments
Closed

Comments

@miranquil
Copy link

miranquil commented Jul 2, 2019

Here i'm using serve like a static file server, I store files in it and visit from my program. But here comes a problem that if someone see my link such as http://example.com/1.jpeg, they can cut off the filename and visit http://example.com, then they will get a whole list of my files. Sometimes this will bring me some trouble.

Can I have an option to hide files from listing by visiting the root domain? I mean, when people open my domain, they will get nothing, but still they can get my files by direct link.

@kristof-mattei
Copy link

https://github.com/zeit/serve-handler#directorylisting-booleanarray

Set directoryListing to false.

@miranquil
Copy link
Author

https://github.com/zeit/serve-handler#directorylisting-booleanarray

Set directoryListing to false.

Thank you very much!

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

No branches or pull requests

2 participants