如何将网络固定在Flex中?

发布于 2025-02-11 01:33:45 字数 199 浏览 1 评论 0原文

我正在使用Twilio Flex创建呼叫中心,并且我有一个由Azure App Service托管的ASP.NET MVC项目,我正在尝试使用下一个代码嵌入面板2:Flex.crmcontainer.defaultprops.uri = 'domain.com';

但是由于此错误:“ X-Frame-Options”到“ Sameorigin”。我该如何解决这个问题?

I'm using Twilio Flex to create a call center, and I have an ASP.NET MVC project hosted by an Azure App Service which I'm trying to embed into Panel 2 using the next code: flex.CRMContainer.defaultProps.uri = 'domain.com';

But I cannot display it because of this error: 'X-Frame-Options' to 'sameorigin'. How can I solve this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

恏ㄋ傷疤忘ㄋ疼 2025-02-18 01:33:45

在这里弯曲。

x-frame-options:Sameorigin是由域设置的响应标头 - 在您的情况下,无论是在应用程序域上控制HTTP请求的内容。 SameOrigin表示资源被拒绝 - 它不会在域外的iframe中加载。有关X-Frame-options的更多信息,请参见 x-frame-options

修复程序将取决于您自己的设置。 Azure有一个可以编辑的Web.config文件。添加此信息:

         <customHeaders>
            <clear />
            <remove name="X-Frame-Options"/>
         </customHeaders>

或因为您使用的是ASP,可以将此行添加到您的global.asax文件

system.web.helpers.antiforgeryconfig.suppressxframeoptionsheader = true = true;

Flex TSE here.

x-frame-options:sameorigin is a response header set by the domain - in your case, whatever is controlling http requests on your app's domain. SAMEORIGIN means that the resource is refused - it will not load in an iframe outside of the domain. For more information on X-Frame-Options, see the MDN doc on X-Frame-Options.

The fix is going to depend on your own setup. Azure has a web.config file you can edit. Add this:

         <customHeaders>
            <clear />
            <remove name="X-Frame-Options"/>
         </customHeaders>

or since you're using ASP you can add this line to your global.asax file

System.Web.Helpers.AntiForgeryConfig.SuppressXFrameOptionsHeader = true;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文