Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-csrf-local

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-csrf-local

Express middleware for including the token generated by Connect's CSRF middleware in the locals object for templates.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

build status express-csrf-local

Express middleware for including the token generated by Connect's CSRF middleware in the locals object for templates.

Installation

npm install express-csrf-local

Usage

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.

Testing

npm install
npm test

Issues

Found a bug? Create an issue on GitHub.

https://github.com/jharding/express-csrf-local/issues

Versioning

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:

  • Breaking backwards compatibility bumps the major
  • New additions without breaking backwards compatibility bumps the minor
  • Bug fixes and misc changes bump the patch

For more information on semantic versioning, please visit http://semver.org/.

License

Copyright (c) 2012 Jake Harding
Licensed under the MIT License.

Keywords

FAQs

Package last updated on 15 Sep 2012

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc