
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
@routup/cookie
Advanced tools
This is a plugin for reading and parsing request cookies, as well serializing cookies for the response.
Table of Contents
npm install @routup/cookie --save
To read the docs, visit https://routup.net
It is important to invoke the request middleware, to parse the cookies of the request header.
import {Router, send} from 'routup';
import {
setResponseCookie,
useRequestCookie,
useRequestCookies
} from '@routup/cookie';
const router = new Router();
router.get('/', (req, res) => {
const cookies = useRequestCookies(req);
console.log(cookies);
// { key: value, ... }
const cookie = useRequestCookie(req, 'foo');
console.log(cookie);
// value
setResponseCookie(res, 'foo', 'bar');
send(res, 'Hello World');
});
router.listen(3000);
Made with 💚
Published under MIT License.
FAQs

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.