Skip to content

Commit

Permalink
return this from kepi.safe() and kepi.applyTo()
Browse files Browse the repository at this point in the history
  • Loading branch information
MorganConrad committed Nov 13, 2018
1 parent 4891bad commit 665a1a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -49,6 +49,9 @@ But sometimes you need to add stuff dynamically

app.use(kepi.middleware());

### If you just want to mimic (more or less) [helmet](https://www.npmjs.com/package/helmet)

app.use(kepi().safe().middleware());

## API

Expand Down
6 changes: 4 additions & 2 deletions kepi.js
Expand Up @@ -24,7 +24,8 @@ class Kepi {
let headerNames = Object.keys(this.headers);
headerNames.forEach( (headerName) => {
this.headers[headerName].applyTo(response);
});
});
return this;
}


Expand Down Expand Up @@ -52,7 +53,8 @@ class Kepi {
let allSafe = Object.assign({}, this.options.SAFE, this.options.safe);
Object.keys(allSafe).forEach( (headerName) => {
this.header(headerName).safe();
});
});
return this;
}

_fullName(name) {
Expand Down

0 comments on commit 665a1a1

Please sign in to comment.