google-chromeasp.net-coreaureliasecurity-policy

"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.


Solution

  • 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