Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Error with Permissions-Policy header" getting after Chrome update

Getting following error from the console window after updating the chrome to version 88.0.4324.104

Error with Permissions-Policy header: Parse of permission policy failed because of errors reported by strctured header parser.

The application developed from ASP.NET Core 3.1 with Aurelia SPA. Tried to add following middleware to backend

app.Use(async (context, next) =>
           
{      
         context.Response.Headers.Add("Permission-Policy", "geolocation 'none';midi 'none';notifications 'none';push 'none';sync-xhr 'none';microphone 'none';camera 'none';magnetometer 'none';gyroscope 'none';speaker 'self';vibrate 'none';fullscreen 'self';payment 'none';");
         await next(); 
});

But still getting the console error.

like image 525
Sithira Pathirana Avatar asked Jan 25 '21 09:01

Sithira Pathirana


People also ask

How do I change permissions on a policy header?

You can find the Permissions Header policy settings in the Premium tab from your Really Simple SSL Dashboard (Settings -> SSL -> Premium). To enable the Permission Policy header, enable the 'Permissions Policy' option. Once enabled, a new block containing a list of directives and their values will appear.

What is a permission policy?

Permissions Policy, formerly known as Feature Policy, allows the developer to control the browser features available to a page, its iframes, and subresources, by declaring a set of policies for the browser to enforce. These policies are applied to origins provided in a response header origin list.


1 Answers

I had this same problem and it was solved this way:

The way you are creating the permissions policy is different.

Permissions-Policy: fullscreen=(self "https://example.com"), geolocation=*, camera=()

Big changes since this was called Feature Policy

like image 161
Dereckson Santana Avatar answered Oct 17 '22 05:10

Dereckson Santana