Download the PHP package waughj/permissions-policy without Composer
On this page you can find all versions of the php package waughj/permissions-policy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download waughj/permissions-policy
More information about waughj/permissions-policy
Files in waughj/permissions-policy
Download waughj/permissions-policy
More information about waughj/permissions-policy
Files in waughj/permissions-policy
Vendor waughj
Package permissions-policy
Short Description Module for easily setting web page’s permissions policy.
License AGPL-3.0-or-later
Package permissions-policy
Short Description Module for easily setting web page’s permissions policy.
License AGPL-3.0-or-later
Keywords security headerspermissions-policy
Please rate this library. Is it a good library?
Informations about the package permissions-policy
Permissions Policy
Module for easily setting web page’s permissions policy.
Use
Just call static method “setPolicies” with associative array with valid policy types. Policy types not set will default to empty (disabled).
Call “createPolicies” to return header string rather than setting header, which can be used for testing purposes before setting header.
Example
use WaughJ\PermissionsPolicy\PermissionsPolicy;
PermissionsPolicy::setPolicies
([
'accelerometer' => 'self',
'autoplay' => 'https://www.jaimeson-waugh.com',
'camera' => [ 'self' ],
'geolocation' => [ 'self', 'https://www.jaimeson-waugh.com' ],
'gyroscope' => true,
'fullscreen' => '*'
]);
/*
Will set header 'permissions-policy: permissions-policy: accelerometer=self,
autoplay=(), camera=(self), document-domain=(), encrypted-media=(),
fullscreen=*, geolocation=(self "https://www.jaimeson-waugh.com"),
gyroscope=*, magnetometer=(), microphone=(), midi=(), payment=(),
picture-in-picture=(), sync-xhr=(), usb=(), xr-spatial-tracking=()'
*/
Changelog
0.1.0
- Initial Version
All versions of permissions-policy with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.3
The package waughj/permissions-policy contains the following files
Loading the files please wait ....