Gathering detailed insights and metrics for backbone.csrf
Gathering detailed insights and metrics for backbone.csrf
Gathering detailed insights and metrics for backbone.csrf
Gathering detailed insights and metrics for backbone.csrf
npm install backbone.csrf
Typescript
Module System
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
6 Stars
18 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Jan 23, 2018
Latest Version
1.0.2
Package Id
backbone.csrf@1.0.2
Size
3.66 kB
NPM Version
1.4.28
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
Configure your Backbone application to be compatible with your csrf-protected backend web frameworks
Ha Junsoo <kuc2477@gmail.com>
_Backbone.js <https://backbone.org>
_ 1.7.1 or laterjQuery <https://jquery.com>
_.. code-block:: shell
bower install backbone.csrf
Or
.. code-block:: shell
npm install backbone.csrf
.. code-block:: shell
npm install && grunt
Although there are few cases where a Backbone application plays alone without any backend frameworks such as Django, Rails, Play, etc, Backbone itself lacks support for csrf token authentication, which most of backend web frameworks requires for client side requests for the sake of their security.
backbone.csrf will make your Backbone application compatible with your backend web frameworks that implements CSRF protecting systems.
Module's the only method initialize()
configures Backbone.sync()
to set X-CSRFToken request header for every requests it sends to make sure that all backbone requests are sent with csrf tokens.
You can also configure your jquery's $.ajax
calls by passing true
to initialize()
call. This will allow you to send csrf-protection compatible requests to backends directly with $.ajax
calls. This can be useful in case when you need requests that doesn't match Backbone ORM.
Add <meta name='csrf-token' content={{ csrf_token }}>
to your markup.
Initialize backbone.csrf before you start your Backbone application.
.. code-block:: javascript
// Node/CommonJS
var BackboneCSRF = require('backbone.csrf');
BackboneCSRF.initialize();
...
// AMD
require(['backbone.csrf'], function(BackboneCSRF) {
BackboneCSRF.initialize();
...
});
1.0.2 (October 27, 2015):
1.0.1 (July 31, 2015):
Set X-CSRFToken
header on requests only when it is non-fetch requests.
Set X-CSRFToken
header on jquery.ajax requests by calling initialize()
with boolean parameter true
. Default is false
.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/18 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More