Skip to content

Commit

Permalink
docs: fixed docs
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Jul 2, 2022
1 parent 6c6ca10 commit 97734bc
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ npm install koa-csrf

## Usage

1. Add middleware in Koa app (default options are shown):
1. Add middleware in Koa app (see [options](#options) below):

```js
const Koa = require('koa');
Expand All @@ -53,12 +53,7 @@ npm install koa-csrf
app.use(bodyParser());

// add the CSRF middleware
app.use(new CSRF({
invalidTokenMessage: 'Invalid CSRF token',
invalidTokenStatusCode: 403,
excludedMethods: [ 'GET', 'HEAD', 'OPTIONS' ],
disableQuery: false
}));
app.use(new CSRF());

// your middleware here (e.g. parse a form submit)
app.use((ctx, next) => {
Expand Down

0 comments on commit 97734bc

Please sign in to comment.