mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #17596 from overleaf/rh-permissions-policy
[web] Add Permissions-Policy header GitOrigin-RevId: 8934bbbda411102580d9ef8af135dcdc147627f9
This commit is contained in:
@@ -105,6 +105,40 @@ const parseTextExtensions = function (extensions) {
|
||||
}
|
||||
}
|
||||
|
||||
const httpPermissionsPolicy = {
|
||||
blocked: [
|
||||
'accelerometer',
|
||||
'attribution-reporting',
|
||||
'browsing-topics',
|
||||
'camera',
|
||||
'display-capture',
|
||||
'encrypted-media',
|
||||
'fullscreen',
|
||||
'gamepad',
|
||||
'geolocation',
|
||||
'gyroscope',
|
||||
'hid',
|
||||
'identity-credentials-get',
|
||||
'idle-detection',
|
||||
'local-fonts',
|
||||
'magnetometer',
|
||||
'microphone',
|
||||
'midi',
|
||||
'otp-credentials',
|
||||
'payment',
|
||||
'picture-in-picture',
|
||||
'screen-wake-lock',
|
||||
'serial',
|
||||
'storage-access',
|
||||
'usb',
|
||||
'window-management',
|
||||
'xr-spatial-tracking',
|
||||
],
|
||||
allowed: {
|
||||
autoplay: 'self "https://videos.ctfassets.net"',
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
env: 'server-ce',
|
||||
|
||||
@@ -275,6 +309,11 @@ module.exports = {
|
||||
recurly: {},
|
||||
},
|
||||
|
||||
// Defines which features are allowed in the
|
||||
// Permissions-Policy HTTP header
|
||||
httpPermissions: httpPermissionsPolicy,
|
||||
useHttpPermissionsPolicy: true,
|
||||
|
||||
jwt: {
|
||||
key: process.env.OT_JWT_AUTH_KEY,
|
||||
algorithm: process.env.OT_JWT_AUTH_ALG || 'HS256',
|
||||
|
||||
Reference in New Issue
Block a user