Skip to content

Commit f2b7680

Browse files
author
lukaw3d
committed
Set Permissions-Policy for Transak
1 parent 4ad93f2 commit f2b7680

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

internals/getPermissionHeaders.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,26 @@ const getCsp = ({ isExtension } = { isExtension: false }) =>
5656
// Generated with https://www.permissionspolicy.com/
5757
const getPermissionsPolicy = () =>
5858
`
59-
accelerometer=(),
59+
accelerometer=("https://api.sardine.ai"),
6060
ambient-light-sensor=(),
6161
autoplay=(),
6262
bluetooth=(self),
63-
camera=(),
63+
camera=("https://global.transak.com" "https://global-stg.transak.com"),
6464
cross-origin-isolated=(),
6565
display-capture=(),
6666
document-domain=(),
6767
encrypted-media=(),
6868
execution-while-not-rendered=(),
6969
execution-while-out-of-viewport=(),
70-
fullscreen=(self),
70+
fullscreen=(self "https://global.transak.com" "https://global-stg.transak.com"),
7171
geolocation=(),
72-
gyroscope=(),
72+
gyroscope=("https://api.sardine.ai"),
7373
keyboard-map=(),
7474
magnetometer=(),
75-
microphone=(),
75+
microphone=("https://global.transak.com" "https://global-stg.transak.com"),
7676
midi=(),
7777
navigation-override=(),
78-
payment=(),
78+
payment=("https://global.transak.com" "https://global-stg.transak.com"),
7979
picture-in-picture=(),
8080
publickey-credentials-get=(),
8181
screen-wake-lock=(),

src/app/pages/FiatOnrampPage/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ export function FiatOnramp() {
112112
<iframe
113113
height="875"
114114
title="Transak On/Off Ramp Widget"
115+
// From https://github.com/Transak/transak-sdk/blob/2ebb3bd/src/index.js#L52
116+
// TODO: It also loads https://api.sardine.ai inside, and that tries
117+
// to listen for devicemotion and deviceorientation. Is this necessary?
115118
allow="camera;microphone;fullscreen;payment"
116119
// Restrict top-navigation
117120
sandbox={[

0 commit comments

Comments
 (0)