Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(inIframe-whitelists): Implement.

Hristo Terezov8f6f542e9c07
diff --git a/react/features/base/config/configWhitelist.ts b/react/features/base/config/configWhitelist.ts
index 93cdc24bf6..2c52fe33d9 100644
--- a/react/features/base/config/configWhitelist.ts
+++ b/react/features/base/config/configWhitelist.ts
@@ -1,4 +1,7 @@
+import { inIframe } from '../util/iframeUtils';
+
import extraConfigWhitelist from './extraConfigWhitelist';
+import inIframeConfigWhitelist from './inIframeConfigWhitelist';
/**
* The config keys to whitelist, the keys that can be overridden.
@@ -243,4 +246,4 @@ export default [
'webrtcIceTcpDisable',
'webrtcIceUdpDisable',
'whiteboard.enabled'
-].concat(extraConfigWhitelist);
+].concat(extraConfigWhitelist).concat(inIframe() ? inIframeConfigWhitelist : []);
diff --git a/react/features/base/config/inIframeConfigWhitelist.ts b/react/features/base/config/inIframeConfigWhitelist.ts
new file mode 100644
index 0000000000..be1917a305
--- /dev/null
+++ b/react/features/base/config/inIframeConfigWhitelist.ts
@@ -0,0 +1,4 @@
+/**
+ * Additional config whitelist extending the original whitelist in the case where jitsi-meet is loaded in an iframe.
+ */
+export default [];
diff --git a/react/features/base/config/inIframeInterfaceConfigWhitelist.ts b/react/features/base/config/inIframeInterfaceConfigWhitelist.ts
new file mode 100644
index 0000000000..a50628adad
--- /dev/null
+++ b/react/features/base/config/inIframeInterfaceConfigWhitelist.ts
@@ -0,0 +1,5 @@
+/**
+ * Additional interface config whitelist extending the original whitelist in the case where jitsi-meet is loaded in an
+ * iframe.
+ */
+export default [];
diff --git a/react/features/base/config/interfaceConfigWhitelist.ts b/react/features/base/config/interfaceConfigWhitelist.ts
index 24fb17c4a2..ae97fc8535 100644
--- a/react/features/base/config/interfaceConfigWhitelist.ts
+++ b/react/features/base/config/interfaceConfigWhitelist.ts
@@ -1,4 +1,7 @@
+import { inIframe } from '../util/iframeUtils';
+
import extraInterfaceConfigWhitelistCopy from './extraInterfaceConfigWhitelist';
+import inIframeInterfaceConfigWhitelist from './inIframeInterfaceConfigWhitelist';
/**
* The interface config keys to whitelist, the keys that can be overridden.
@@ -51,4 +54,4 @@ export default [
'VERTICAL_FILMSTRIP',
'VIDEO_LAYOUT_FIT',
'VIDEO_QUALITY_LABEL_DISABLED'
-].concat(extraInterfaceConfigWhitelistCopy);
+].concat(extraInterfaceConfigWhitelistCopy).concat(inIframe() ? inIframeInterfaceConfigWhitelist : []);