-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Incorrect default value for dotfiles in docs for express.static #1431
Comments
I second that there's an issue but the default value isn't "allow" either, it's just some value that isn't actually any of the three proposed (which is definitely a design flaw, IMHO). The serve-static doc is much clearer on that respect:
Please fix the doc of express to match! I spent half an hour trying to find a solution to hide my .git folders from my public tree before finding this discrepancy and realizing that, in fact, the solution was to set dotfiles to 'ignore', which is counter-intuitive when express's doc says it is already the default value! |
Hey 👋 As of now, the default value of
However the line which says the following has to be updated as it indeed ignores the dotfiles as the default behavior. Perhaps even remove this line.
@bjohansebas would you be interested in opening a PR for that? Also, a bit off-topic, but in case anyone is wondering why is it giving 404 for |
Thanks @IamLizu for the help, I'll open a PR to fix it |
Awesome @bjohansebas 👍
Let's wait for #1599 to be landed first. We can verify for 5 and fix in a different PR if needed. |
I think the default value mentioned at https://github.com/expressjs/expressjs.com/blob/gh-pages/_includes/api/en/4x/express.static.md#expressstaticroot-options is incorrect. It says in the table that the default value is 'ignore', but in the detailed docs at https://github.com/expressjs/expressjs.com/blob/gh-pages/_includes/api/en/4x/express.static.md#dotfiles which are linked in the table, it says this:
The actual default value seems to be 'allow'.
(The docs for v5 have the same table with the same default value but I don't know whether the behavior changed for v5.)
The text was updated successfully, but these errors were encountered: