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

47.6k views Asked by At

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.

1

There are 1 answers

0
Dereckson Santana On BEST ANSWER

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