-
Is it necessary to store the full IP address and user agent in the database? I would prefer to store as little personal information as possible. In Europe under the GDPR law, the IP address is considered to be personal information as well. It would be great to have a setting for 1) pseudonymization of IP addresses and 2) for turning off storage of the user agent. Of course, for information already stored in the database, it would have to be removed as well, either manually or automatically, once the setting(s) are activated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
You can use // index.js
const Waline = require('@waline/vercel');
module.exports = Waline({
preSave(data) {
delete data.ua;
// store ip 192.168.1.1 with mask like 192.*.*.1
data.ip = data.ip.replace(/\.\d+\.\d+\./, '.*.*.');
// or you can use delete data.ip to stop store it.
// delete data.ip;
}
}); If you want to clean stored ip and ua, you can go to leancloud dashboard to clear it like following: |
Beta Was this translation helpful? Give feedback.
-
Is this the reason why comment box doesn't show in EU countries ? |
Beta Was this translation helpful? Give feedback.
You can use
preSave
hooks to do it if you want to stop store IP and UA address when post comment. https://waline.js.org/en/reference/server.html#presave-commentIf you want to clean stored ip and ua, you can go to leancloud dashboard to clear it like following: