Interactive interface for browsing global, full-resolution satellite imagery
reimplement embed links & update content security policy (#4291)
Ryan Weiler27bd0c6a9b7a
diff --git a/web/index.html b/web/index.htmlindex 287f1c359..ae882ed4d 100644--- a/web/index.html+++ b/web/index.html@@ -71,6 +71,7 @@ Licensed under the NASA Open Source Agreement, Version 1.3 (https://opensource.g<link rel="apple-touch-icon" href="images/wv-logo-apple-icon.png"><link rel="manifest" href="manifest.webmanifest"><meta name="theme-color" content="#FFFFFF"/>+ <meta http-equiv="Content-Security-Policy" content="frame-ancestors 'self' nasa.gov *.nasa.gov frame-src 'self' nasa.gov *.nasa.gov"></head><body>diff --git a/web/js/containers/share.js b/web/js/containers/share.jsindex f82f7b32f..1e74aabdd 100644--- a/web/js/containers/share.js+++ b/web/js/containers/share.js@@ -16,7 +16,7 @@ import {import ShareLinks from '../components/toolbar/share/links';import ShareToolTips from '../components/toolbar/share/tooltips';import {- getPermalink, getShareLink, wrapWithObject,+ getPermalink, getShareLink, wrapWithIframe,} from '../modules/link/util';import { getSelectedDate } from '../modules/date/selectors';import Checkbox from '../components/util/checkbox';@@ -37,7 +37,7 @@ const getShortenRequestString = (mock, permalink) => {);};-const SOCIAL_SHARE_TABS = ['link', 'social'];+const SOCIAL_SHARE_TABS = ['link', 'embed', 'social'];class ShareLinkContainer extends Component {constructor(props) {@@ -268,7 +268,7 @@ class ShareLinkContainer extends Component {activeTab,} = this.state;const embedValue = this.getPermalink(true);- const embedIframeHTMLCode = wrapWithObject(embedValue);+ const embedIframeHTMLCode = wrapWithIframe(embedValue);return (<TabPane tabId="embed" className="share-tab-embed">@@ -329,7 +329,7 @@ class ShareLinkContainer extends Component {{this.renderNavTabs()}<TabContent activeTab={activeTab}>{this.renderLinkTab()}- {/* {this.renderEmbedTab()} */}+ {this.renderEmbedTab()}{this.renderSocialTab()}</TabContent></div>