Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ with the provided Dockerfile.
|`-K` or `--key` |Path to ssl key file |`key.pem` |
|`-r` or `--robots` | Automatically provide a /robots.txt (The content of which defaults to `User-agent: *\nDisallow: /`) | `false` |
|`--no-dotfiles` |Do not show dotfiles| |
|`--hide-permissions` |Do not show file permissions| |
|`--mimetypes` |Path to a .types file for custom mimetype definition| |
|`-h` or `--help` |Print this list and exit. | |
|`-v` or `--version`|Print the version and exit. | |
Expand Down
2 changes: 2 additions & 0 deletions bin/http-server
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ if (argv.h || argv.help) {
'',
' -r --robots Respond to /robots.txt [User-agent: *\\nDisallow: /]',
' --no-dotfiles Do not show dotfiles',
' --hide-permissions Do not show file permissions',
' --mimetypes Path to a .types file for custom mimetype definition',
' -h --help Print this list and exit.',
' -v --version Print the version and exit.',
Expand Down Expand Up @@ -203,6 +204,7 @@ function listen(port) {
proxyConfig: proxyConfig,
proxyAll: proxyAll,
showDotfiles: argv.dotfiles,
hidePermissions: argv['hide-permissions'],
mimetypes: argv.mimetypes,
contentType: argv['content-type'],
username: argv.username || process.env.NODE_HTTP_SERVER_USERNAME,
Expand Down
4 changes: 4 additions & 0 deletions doc/http-server.1
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ If not specified, uses "User-agent: *\\nDisallow: /]"
.BI \-\-no\-dotfiles
Do not show dotfiles.

.TP
.BI \-\-hide\-permissions
Do not show file permissions.

.TP
.BI \-h ", " \-\-help
Print usage and exit.
Expand Down
2 changes: 2 additions & 0 deletions lib/http-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function HttpServer(options) {
this.dirOverrides404 = options.dirOverrides404;
this.autoIndex = options.autoIndex !== 'false';
this.showDotfiles = options.showDotfiles;
this.hidePermissions = options.hidePermissions;
this.gzip = options.gzip === true;
this.brotli = options.brotli === true;
this.forceContentEncoding = options.forceContentEncoding === true;
Expand Down Expand Up @@ -203,6 +204,7 @@ function HttpServer(options) {
cache: this.cache,
showDir: this.showDir,
showDotfiles: this.showDotfiles,
hidePermissions: this.hidePermissions,
autoIndex: this.autoIndex,
defaultExt: this.ext,
dirOverrides404: this.dirOverrides404,
Expand Down
Loading