如何解决Chrome 更新后出现“权限策略标题错误”
将 chrome 更新到版本 88.0.4324.104 后,控制台窗口出现以下错误
Error with Permissions-Policy header: Parse of permission policy failed because of errors reported by strctured header parser.
使用 Aurelia SPA 从 ASP.NET Core 3.1 开发的应用程序。尝试将以下中间件添加到后端
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();
});
但仍然收到控制台错误。
解决方法
我遇到了同样的问题,它是这样解决的:
您创建权限策略的方式不同。
Permissions-Policy: fullscreen=(self "https://example.com"),geolocation=*,camera=()
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。