Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'

I have just started react.

My page works fine on localhost.

Now I am trying to host my page on github.

I have used "npm run deploy" and hosted

This is my package.json

This is my package.json

Now when I am trying to access my page I run into errors and the first warning concerns me the most .

Errors

This is my page : Github Page

What is this "Permission Policy" and how do I fix it?

like image 653
Danish Javed Avatar asked Aug 30 '25 15:08

Danish Javed


2 Answers

Basically you can ignore it. GitHub hosted pages disable FLoC, which is Google's 3rd party cookie alternative. GitHub, Microsoft, doesn't seems to like it.

https://github.blog/changelog/2021-04-27-github-pages-permissions-policy-interest-cohort-header-added-to-all-pages-sites/

like image 106
Takash Futada Avatar answered Sep 02 '25 07:09

Takash Futada


I know it is a little bit late. But I'll keep this here as I don't see an answer on how to fix this problem. So we basically just need to add this <meta> tag on index.html file:

<meta http-equiv="Permissions-Policy" content="interest-cohort=()">
like image 40
Saff.gh Avatar answered Sep 02 '25 06:09

Saff.gh