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
When the index is set to false, requests ending with / are being served with the content type header set to application/octet-stream instead of actual file's content type
#160
Open
rmhaiderali opened this issue
Jan 17, 2024
· 4 comments
Windows intentionally implemented this behavior where, when accessing a path, if it ends with "/", instead of treating it as a directory, it checks if a file with the same name exists. In such cases, it ignores the "/" and allows users to access files as if the path did not end with "/".
I'm unsure about which package (serve-static or send) we should modify to include a check that restricts serving a file if its path ends with "/".
For example, when requesting /index.html/, the server is responding with a Content-Type header set to application/octet-stream instead of text/html.
index.js
public/index.html
The text was updated successfully, but these errors were encountered: