Security News
Combatting Alert Fatigue by Prioritizing Malicious Intent
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
egg-cookies
Advanced tools
Extends pillarjs/cookies to adapt koa and egg with some additional features.
egg-cookies provide an alternative encrypt
mode like signed
. An encrypt cookie's value will be encrypted base on keys. Anyone who don't have the keys are unable to know the original cookie's value.
const Cookies = require('egg-cookies');
const cookies = new Cookies(ctx, keys[, defaultCookieOptions]);
cookies.set('foo', 'bar', { encrypt: true });
cookies.get('foo', { encrypt: true });
Note: you should both indicating in get and set in pairs.
Browsers all had some limitation in cookie's length, so if set a cookie with an extremely long value(> 4093), egg-cookies will emit an cookieLimitExceed
event. You can listen to this event and record.
const Cookies = require('egg-cookies');
const cookies = new Cookies(ctx, keys);
cookies.on('cookieLimitExceed', { name, value } => {
// log
});
cookies.set('foo', longText);
fengmk2 | dead-horse | atian25 | whxaxes | xyeric | jedmeng |
---|---|---|---|---|---|
Junyan | beliefgp | snapre | popomore | semantic-release-bot | ziyunfei |
brizer | xuezier | onlylovermb |
This project follows the git-contributor spec, auto updated at Sat Aug 05 2023 01:46:53 GMT+0800
.
FAQs
cookies module for egg
The npm package egg-cookies receives a total of 15,540 weekly downloads. As such, egg-cookies popularity was classified as popular.
We found that egg-cookies demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.