Skip to content

Commit

Permalink
Merge branch 'johntron-feature/dotfiles-visibility'
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBlueHat committed Jun 22, 2017
2 parents 4f3a998 + 966ce9c commit 402ad49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/http-server
Expand Up @@ -39,6 +39,7 @@ if (argv.h || argv.help) {
' -K --key Path to ssl key file (default: key.pem).',
'',
' -r --robots Respond to /robots.txt [User-agent: *\\nDisallow: /]',
' --no-dotfiles Do not show dotfiles',
' -h --help Print this list and exit.'
].join('\n'));
process.exit();
Expand Down Expand Up @@ -101,7 +102,8 @@ function listen(port) {
robots: argv.r || argv.robots,
ext: argv.e || argv.ext,
logFn: logger.request,
proxy: proxy
proxy: proxy,
showDotfiles: argv.dotfiles
};

if (argv.cors) {
Expand Down
2 changes: 2 additions & 0 deletions lib/http-server.js
Expand Up @@ -46,6 +46,7 @@ function HttpServer(options) {
this.cache = options.cache === undefined ? 3600 : options.cache; // in seconds.
this.showDir = options.showDir !== 'false';
this.autoIndex = options.autoIndex !== 'false';
this.showDotfiles = options.showDotfiles;
this.gzip = options.gzip === true;
this.contentType = options.contentType || 'application/octet-stream';

Expand Down Expand Up @@ -96,6 +97,7 @@ function HttpServer(options) {
root: this.root,
cache: this.cache,
showDir: this.showDir,
showDotfiles: this.showDotfiles,
autoIndex: this.autoIndex,
defaultExt: this.ext,
gzip: this.gzip,
Expand Down

1 comment on commit 402ad49

@BigBlueHat
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From PR #218

Please sign in to comment.