strict-cookie-middleware

Parses cookie headers for Connect/Express applications according to RFC 6265.

Usage no npm install needed!

<script type="module">
  import strictCookieMiddleware from 'https://cdn.skypack.dev/strict-cookie-middleware';
</script>

README

Strictly cookie-header-parsing middleware. For Connect (Express) applications.

Usage

const strictCookieMiddleware = require('strict-cookie-middleware');

app.use(strictCookieMiddleware);
const token = req.cookies.get('t');

API

  • request.cookies

    A Map of cookies attached to the request. Empty if the cookie header is invalid.