Add Permissions-Policy Header
Sends a Permissions-Policy HTTP header to disable browser features (camera, microphone, geolocation, etc.) that the site does not need.
PHPby SnipCraft
php
<?php
add_action( 'send_headers', 'scseed_add_permissions_policy_header' );
function scseed_add_permissions_policy_header() {
// Adjust directives to match your site's actual feature requirements.
header( 'Permissions-Policy: '
. 'camera=(), '
. 'microphone=(), '
. 'geolocation=(), '
. 'payment=(), '
. 'usb=(), '
. 'accelerometer=(), '
. 'gyroscope=(), '
. 'magnetometer=(), '
. 'display-capture=(), '
. 'fullscreen=(self)'
);
}#browser#hardening#headers#security