-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Directory listings don't work with magic file 404.html #882
Comments
This could arguably be the expected behavior, but I guess maybe we could have an option to decide whether directory URLs should be displayed as 404 when |
On second thought it does make sense that when |
I think this would be better as an option to specify 404 files. I'm also remembering nginx has a very unfortunate issue where it's difficult to specify all the 40x/50x pages in general, so learning from that http-server should also have the option to specify a general error page if we add this. |
@KernelDeimos So like, an option to specify whether magic 404s should be displayed for directories, if -d is enabled? |
Actually I missed an important detail when I read this at first - specifically that the magic 404.html is something already supported (which seemed to be implied; I'm going to test it myself shortly). I was suggesting a config param to specify the location of a 404 page. I agree with your statement earlier that |
Just did a bit of testing. Since Flag should be verbose and clear for now (I want to hold off reserving new letters for a bit), like |
@KernelDeimos I implemented this feature locally, in the following days I'll make a fork and also add tests. I'll upload the fork tomorrow so you can see my implementation. |
Hello, here is the PR: #894 |
If you are using a 404.html as magic file, then directory listings don't work anymore. The 404.html is displayed instead.
Environment Versions
The text was updated successfully, but these errors were encountered: