add do not track header detection (#2334)

This commit is contained in:
Rotzbua
2019-01-15 01:49:46 +01:00
committed by Andy Miller
parent e520bd0eb8
commit c40dcf020c

View File

@@ -134,4 +134,19 @@ class Browser
return true;
}
/**
* Determine if “Do Not Track” is set by browser
* @see https://www.w3.org/TR/tracking-dnt/
*
* @return bool
*/
public function isTrackable(): bool
{
if ($_SERVER['HTTP_DNT'] === '1') {
return false;
}
return true;
}
}