Load iframe using the same protocol as the app (#985)

This commit is contained in:
Jonatan Kłosko 2022-02-05 22:41:58 +01:00 committed by GitHub
parent 270573d2e6
commit 9fab78d2a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -295,8 +295,12 @@ function bindIframeSize(iframe, iframePlaceholder) {
// (1): https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#document_source_security
// (2): https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox
// When running Livebook on http:// we want to load the iframe from
// http:// as well, otherwise the browser could block asset requests
// from the https:// iframe to http:// Livebook. Both protocols are
// supported by livebook.space
const IFRAME_URL = `${window.location.protocol}//livebook.space/iframe/v2.html`;
const IFRAME_SHA256 = "+uJyGu0Ey7uVV7WwRwg7GyjwCkMNRBnyNc25iGFpYXc=";
const IFRAME_URL = "https://livebook.space/iframe/v2.html";
function initializeIframeSource(iframe) {
return verifyIframeSource().then(() => {