From 4fd47d500f278c2ff173881b20fe43f3dc75d537 Mon Sep 17 00:00:00 2001 From: robyngit Date: Mon, 30 Sep 2024 16:29:10 -0400 Subject: [PATCH] Update default & theme trustedContentSources Issue #1383 --- src/js/models/AppModel.js | 5 +---- src/js/themes/arctic/config.js | 6 ++++++ src/js/themes/dataone/config.js | 8 ++++++++ src/js/themes/knb/config.js | 7 +++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/js/models/AppModel.js b/src/js/models/AppModel.js index 261d4d96c..77e9c108c 100644 --- a/src/js/models/AppModel.js +++ b/src/js/models/AppModel.js @@ -1747,10 +1747,7 @@ define(["jquery", "underscore", "backbone"], function ($, _, Backbone) { * @type {string[]} * @since 0.0.0 */ - trustedContentSources: [ - "https://www.youtube.com/embed/*", - "https://player.vimeo.com/video/*", - ], + trustedContentSources: [], /** If true, then archived content is available in the search index. * Set to false if this MetacatUI is using a Metacat version before 2.10.0 diff --git a/src/js/themes/arctic/config.js b/src/js/themes/arctic/config.js index 481c88b26..7b8b231fb 100644 --- a/src/js/themes/arctic/config.js +++ b/src/js/themes/arctic/config.js @@ -260,6 +260,12 @@ MetacatUI.AppConfig = Object.assign( //Google Analytics googleAnalyticsKey: "G-12EKQM14SH", + + // iFrames in portals + trustedContentSources: [ + "https://*arcticdata.io", + "https://cosima.nceas.ucsb.edu*", + ], }, MetacatUI.AppConfig || {}, ); diff --git a/src/js/themes/dataone/config.js b/src/js/themes/dataone/config.js index 6ad97caab..3d1a8c24a 100644 --- a/src/js/themes/dataone/config.js +++ b/src/js/themes/dataone/config.js @@ -155,6 +155,14 @@ MetacatUI.AppConfig = Object.assign( displayDatasetEditButton: false, displayDatasetControls: false, displayDatasetQualityMetric: true, + + // iFrames in portals + trustedContentSources: [ + "https://*ecoinformatics.org*", + "https://*arcticdata.io", + "https://cosima.nceas.ucsb.edu*", + "https://sasap-data.shinyapps.io/board_of_fisheries/", + ], }, MetacatUI.AppConfig || {}, ); diff --git a/src/js/themes/knb/config.js b/src/js/themes/knb/config.js index 241f0cc6f..bf4b72767 100644 --- a/src/js/themes/knb/config.js +++ b/src/js/themes/knb/config.js @@ -89,6 +89,13 @@ MetacatUI.AppConfig = Object.assign( limitPortalsToSubjects: ["CN=knb-data-admins,DC=dataone,DC=org"], portalEditNotAuthCreateMessage: "Creating new portals is a feature currently only available to a select group of Beta testers. You should still be able to access your existing portals. Please contact us with any questions at the email address below.", + + // iFrames in portals + trustedContentSources: [ + "https://*ecoinformatics.org*", + "https://cosima.nceas.ucsb.edu*", + "https://sasap-data.shinyapps.io/board_of_fisheries/", + ], }, MetacatUI.AppConfig, );