v2.4.0
A new feature and a fix to our recent release of _redirections
was updated in this release:
Redirecting on empty paths
For those of you living in the edge and already using the _redirections
file, there was a bug that if a specific redirections file was crafted, some matches would incorrectly match an empty path. For example assume a URL called /docs/
with the following redirections file:
/docs/:foo /docs/:foo/overview permanent
This would incorrectly match a URL of http://example.com/docs
to be redirected to http://example.com/docs//overview
. We've added a test to ensure this case doesn't repeat again.
Preventing directory listing
For some mission-critical sites, using http-server
truly is just a way to show your websites (HTML-made) to the world without leaking potentially important information while at it.
This release allows you to specify --disable-directory-listing
in any of the configuration forms and automatically return a HTTP 404 Not Found
response if you land on a directory that doesn't include an index. This will also play nicely with an upcoming feature to return a customized 404 page (and potentially returning 200 instead of 404 in those pages, to allow for SPAs to be rendered via http-server
).
What's Changed
- Fix redirecting on empty path parameter by @patrickdappollonio in #123
- Enable option to disable directory listing. by @patrickdappollonio in #124
Full Changelog: v2.3.0...v2.4.0