Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/segment-boneyard/csrf
- Owner: segment-boneyard
- Created: 2013-10-29T03:11:59.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-29T03:12:04.000Z (about 11 years ago)
- Last Synced: 2024-04-09T16:31:02.448Z (7 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