Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/segment-boneyard/csrf

Automatically fill a form's CSRF field.
https://github.com/segment-boneyard/csrf

Last synced: about 7 hours ago
JSON representation

Automatically fill a form's CSRF field.

Awesome Lists containing this project

README

        

# csrf

Automatically fill a form's CSRF field.

## Installation

$ component install segmentio/csrf

## Example

```js
var csrf = require('csrf');
var form = document.querySelector('form');

csrf(form, 'token');
```

## API

### csrf(form, token)

Automatically fill a `form`'s `_csrf` field with `token`.

## License

MIT