Skip to content

Commit 8d5f519

Browse files
committed
Respect sec-gpc header as dnt alternative
1 parent 8c07a3d commit 8d5f519

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/stats.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ if (!environment.isTest) {
9090
}
9191

9292
const handleRequest = (req) => {
93-
if (req.headers['dnt'] !== '1') {
93+
// We will interpret these headers as a sign that the user is privacy-conscious and doesn't
94+
// want to be tracked at all. This isn't really tracking but we will respect them anyways.
95+
if (req.headers['dnt'] !== '1' && req.headers['sec-gpc'] !== '1') {
9496
const ip = req.ip;
9597
uniques.add(ip);
9698
}

0 commit comments

Comments
 (0)