У меня есть страница HTML / ASPX ниже.
До сегодняшнего дня все работало просто отлично.
Теперь я получаю межсайтовую ошибку, и, несмотря на любые изменения в блокировании сторонних файлов cookie или добавлении сайта в Разрешить, я не могу отобразить свою страницу, как раньше, сегодня.
Я нахожусь на chrome версии 80.0.3987.132, и все работало нормально в этой версии, пока я не очистил всю историю просмотра / кэша / файлов cookie.
Сценарий JS вставляет Iframe в DIV с указанными c ID. Я не могу изменить это поведение как API (Spotfire) Есть ли способ исправить проблемы с межсайтовым ресурсом в этом типе примера?
Повар ie, связанный с межсайтовый ресурс на https://server.com/ был установлен без атрибута SameSite
. Он был заблокирован, так как Chrome теперь доставляет файлы cookie только с межсайтовыми запросами, если они установлены с SameSite=None
и Secure
. Вы можете просмотреть файлы cookie в инструментах разработчика в разделе «Приложения»> «Хранилище»> «Файлы cookie» и получить дополнительную информацию по https://www.chromestatus.com/feature/5088147346030592 и https://www.chromestatus.com/feature/5633521622188032.
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta charset="utf-8">
<title>Spotfire Template</title>
<!--Spotfire Javascript API-->
<script type="text/javascript" src="https://server.com/spotfire/js-api/loader.js"></script>
<style>
/*Style the Divs that will hold the Spotfire Pages */
#Element1 {
padding: 0;
margin: 0 auto;
width: 100%;
height: 1090px;
}
#Element2 {
padding: 0;
margin: 0 auto;
width: 100%;
height: 1090px;
}
</style>
</head>
<body>
<!--Include Div Elements with IDs to hold the spotfire pages-->
<div id="Element1"></div>
<div id="Element2"></div>
<script>
//Specify Parameters
var app;
var doc;
var webPlayerServerRootUrl = "https://server.com/spotfire/wp/";
var analysisPath = "/Folder/Analysis";
var parameters = '';
var reloadInstances = false;
var apiVersion = "7.14";
var customizationInfo = {
showAbout: false,
showAnalysisInformationTool: false,
showAuthor: false,
showClose: false,
showCustomizableHeader: false,
showDodPanel: false,
showExportFile: false,
showExportVisualization: false,
showFilterPanel: false,
showHelp: false,
showLogout: false,
showPageNavigation: false,
showReloadAnalysis: false,
showStatusBar: false,
showToolBar: false,
showUndoRedo: false
};
//Declare more variables to add additonal Spotfire Pages
var view0;
var view1;
spotfire.webPlayer.createApplication(webPlayerServerRootUrl, customizationInfo, analysisPath, parameters, reloadInstances, apiVersion, onReadyCallback, onCreateLoginElement);
function onReadyCallback(response, newApp) {
app = newApp;
if (response.status === "OK") {
// The application is ready, meaning that the api is loaded and that the analysis path is validated for the current session (anonymous or logged in user)
console.log("OK received. Opening document to page 0 in element renderAnalysis")
//Add Items here for more pages , You can use Integers for Page Index or Title of Pages {First Element is the DIV ID and second is the PageName/PageIndex}
view0 = app.openDocument("Element1", 0);
view1 = app.openDocument("Element2", 1);
} else {
console.log("Status not OK. " + response.status + ": " + response.message)
}
}
function onError(error) {
console.log("Error: " + error);
}
function onCreateLoginElement() {
console.log("Creating the login element");
// Optionally create and return a div to host the login button
return null;
}
</script>
</body>
</html>