Probably most of you already heard about FLoC. If not - you can find plenty articles about it, here is a sample:
Anyway, I think it’s bad. So if you are like me in that matter (and like Symfony, and Github, and Wordpress, and many more…), you want to block this in your Yii 2 app. Here is one of the ways.
Add this in the web components configuration (usually /config/web.php
):
[
// ... other configuration
'components' => [
// ... other components configuration
'response' => [
'on beforeSend' => function () {
Yii::$app->response->headers->add('permissions-policy', 'interest-cohort=()');
}
],
],
]