我希望在我的主登录位置有一个 iframe 来显示我公司的一些广告(例如此处的 Salesforce:https://login.salesforce.com/)。现在我的 html 看起来像这样:
<body>
<div id="content">
<!-- Here is my whole b2c-content -->
<div id="b2c-content">...</div>
<!-- This is the iframe with the ad -->
<iframe src="url" title="iFrame title"></iframe>
</div>
</body>
我的 css 和一切在测试时都工作正常,但是当我将其上传到 b2c 中的 blob 存储并想要在网站上测试它时,iFrame 未显示。另外,当我检查网页时,html 内容中没有 iframe。在检查器中它看起来像这样:
<body>
<div id="content">
<!-- Here is my whole b2c-content -->
<div id="b2c-content">...</div>
</div>
</body>
有什么好的解决办法吗?
我也尝试将 iframe 放入单独的容器中,但没有帮助。
我刚刚想通了。我必须在自定义政策的
RelyingParty
中添加以下行:
<RelyingParty>
<DefaultUserJourney ReferenceId="SignIn" />
<UserJourneyBehaviors>
<!-- Added this: Enabling JavaScript -->
<ScriptExecution>Allow</ScriptExecution>
</UserJourneyBehaviors>