
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
express-csrf-local
Advanced tools
Express middleware for including the token generated by Connect's CSRF middleware in the locals object for templates.
Express middleware for including the token generated by Connect's CSRF middleware in the locals object for templates.
npm install express-csrf-local
var express = require('express');
var app = express();
app.configure(function() {
// configurations
// ...
app.use(express.csrf());
app.use(require('express-csrf-local')('csrf_token'));
// ...
});
The string argument express-csrf-local
is invoked with is the name of the local that will be contain the CSRF token. This argument is optional and if it's not provided, the name of the local will default to token
.
Be sure to register the CSRF middleware before registering the middleware provided by express-csrf-token
, otherwise you'll run into issues.
npm install
npm test
Found a bug? Create an issue on GitHub.
https://github.com/jharding/express-csrf-local/issues
For transparency and insight into the release cycle, releases will be numbered with the follow format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
For more information on semantic versioning, please visit http://semver.org/.
Copyright (c) 2012 Jake Harding
Licensed under the MIT License.
FAQs
Express middleware for including the token generated by Connect's CSRF middleware in the locals object for templates.
The npm package express-csrf-local receives a total of 1 weekly downloads. As such, express-csrf-local popularity was classified as not popular.
We found that express-csrf-local demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.