Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ponddy-cookie-agreement
Advanced tools
The simple cookie agreement implementation and logging user accepting action.
Install using pip
pip install ponddy-cookie-agreement
Add cookie_policy
to your INSTALL_APPS
setting.
INSTALLED_APPS = [
...
'cookie_policy',
]
Add endpoint on your API root urlpatterns
urlpatterns = [
...
path('cookie/policy/', include('cookie_policy.urls')),
]
Check your TEMPLATES
setting already have request
context process in your context_processors
TEMPLATES = [
{
...
'OPTIONS': {
'context_processors': [
...,
'django.template.context_processors.request'
],
},
}
]
Add the CSS and JS file and include
tag in your template what page you want to show the cookie policy agreement
{% load static %}
<head>
<link href="{% static 'cookie_agreement/cookie.css'%}" rel="stylesheet">
<script src="{% static 'cookie_agreement/cookie.js' %}"></script>
</head>
<body>
{% include 'cookie_agreement.html' %}
</body>
COOKIE_POLICY_URL
PRIVACY_POLICY_URL
TERM_OF_SERVICE_URL
Setting the restful default throttle rates for throttling the accept cookie policy API
DEFAULT_THROTTLE_RATES
Example:
REST_FRAMEWORK = {
'DEFAULT_THROTTLE_RATES': {
'user': '100/day',
'anon': '100/day',
}
}
If you do not want to limit user and your settings already have throttle rates please set user
and anon
to None
REST_FRAMEWORK = {
'DEFAULT_THROTTLE_RATES': {
'your_other_scope': '100/day',
'user': None,
'anon': None,
}
}
FAQs
The cookie agreement API for logging user agreement
We found that ponddy-cookie-agreement 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.