Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
@demos-europe/dp-consent
Advanced tools
This is a small script that allows to manage cookie consent for optional cookies.
import { dpConsent } from 'cookie-consent/dist/dp-consent.es.min.js'
// initializing dp consent
const consent = dpConsent({
notice: '', // text to be shown in the cookie slideout
optionalCookies: [
{
name: '', // the cookie's name
explanation: '' // what does this cookie do
},
{ ... }
], // an array of optional cookies
necessaryCookies: [ /* same structure as above */ ], // an array of necessary cookies
onGrantConsent: () => {}, // callback to be executed when consent is granted
onRevokeConsent: () => {} // callback to be executed when consent is revoked
})
// adjusting consent settings
consent.adjustSettings()
Dp-Cookie-Consent will show a slideout providing options to accept all cookies or to change cookie settings. If all cookies are accepted the onGrantConsent-callback will be executed and all optional cookies can be set. If the user opts to change cookie settings a modal will be opened that presents the user with a list of all necessary and all optional cookies. If the user selects optional cookies and saves these settings, the onGrantConsent-callback will be executed. If the user doesn't select optional cookies the onRevokeConsent-callback will be executed. A cookie will be set that remembers the user's choice. The cookie expires within one year.
FAQs
A cookie consent solution.
We found that @demos-europe/dp-consent demonstrated a healthy version release cadence and project activity because the last version was released less than 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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.