lighttp引擎默认Permissions Policy策略

功能说明

Permissions Policy策略包含自动播放、相机、显示截图、文档域、陀螺仪、麦克风、剪贴板、空闲检测、串行等应用权限在web端的控制。

lighttp的permissions policy值

在nginx站点conf中加入

add_header Permissions-Policy "accelerometer=(self), autoplay=(self), camera=(self), cross-origin-isolated=(self), display-capture=(self), document-domain=(self), encrypted-media=(self), fullscreen=(self), geolocation=(self), gyroscope=(self), magnetometer=(self), microphone=(self), midi=(self), payment=(self), picture-in-picture=(self), publickey-credentials-get=(self), screen-wake-lock=(self), sync-xhr=(self), usb=(self), web-share=(self), xr-spatial-tracking=(self), clipboard-read=(self), clipboard-write=(self), hid=(self), idle-detection=(self), serial=(self)";

括号内支持的值有:

accelerometer=(*)
accelerometer=(self)
accelerometer=("https://exmple.com")
accelerometer=()

作者: 李行健

News

2022

2021

Update: 2022-3-19 10:38