https://github.com/segment-boneyard/csrf
Automatically fill a form's CSRF field.
https://github.com/segment-boneyard/csrf
Last synced: 4 months ago
JSON representation
Automatically fill a form's CSRF field.
- Host: GitHub
- URL: https://github.com/segment-boneyard/csrf
- Owner: segment-boneyard
- Created: 2013-10-29T03:11:59.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-29T03:12:04.000Z (over 11 years ago)
- Last Synced: 2025-01-16T05:55:37.357Z (6 months ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 4
- Watchers: 39
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
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`.
## LicenseMIT