"Error with Permissions-Policy header" getting after Chrome update
Asked Answered
D

1

17

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.

Declivous answered 25/1, 2021 at 9:28 Comment(0)
O
22

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

Omer answered 26/1, 2021 at 10:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.