You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
The default value is similar to `'ignore'`, with the exception that this
default will not ignore the files within a directory that begins with a dot.
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!
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: