FlashLite 2.x/3.0 跨域策略文件

发布于 2024-08-13 11:21:39 字数 464 浏览 5 评论 0原文

根据我对 swf 跨域请求的 Adob​​e 文档的理解,服务器上需要两种类型的策略文件:

  1. URL 策略文件:该文件名为“crossdomain.xml”并存储在服务器,一般是对服务器的http请求。
    System.security.loadPolicyFile("http://foo.com/crossdomain.xml");

  2. 套接字策略文件:这是通过 xmlsocket 协议在端口 843 上使用 请求的System.security.loadPolicyFile("xmlsocket://foo.com:843");

问题是,如果我的 FLashLite 客户端仅使用套接字(通过 xmlSocket)与服务器通信,我是否还需要请求跨域。 xml 通过 http,或者我可以跳过步骤 1 并直接在步骤 2 中请求套接字策略文件吗?

As per my understanding of the Adobe docs for a cross domain request by an swf, two types of policy files are required on the server:

  1. URL policy file: this is named "crossdomain.xml" and stored in the root of the server and is generally an http request to the server.
    System.security.loadPolicyFile("http://foo.com/crossdomain.xml");

  2. Socket policy file: this is requested via xmlsocket protocol and on port 843 using say System.security.loadPolicyFile("xmlsocket://foo.com:843");

The question is if my FLashLite client is only going to be talking to the server using Sockets(via xmlSocket) do I still need to ask for crossdomain.xml over http, or can I skip step 1 and directly ask for the socket policy file at step 2?

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

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

发布评论

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

评论(1

故事还在继续 2024-08-20 11:21:39

如果您的 FlashLite 客户端位于同一域中,则即使您要通过 http - crossdomain.xml 与服务器通信,也不需要 http crossdomain.xml 文件> 是跨域访问需要的,同域访问不需要。

无论您的 swf 位于何处,都需要 xmlsocket 策略文件 - 这是不同的。

If your FlashLite client resides in the same domain, you don't need an http crossdomain.xml file even if you are going to communicate with the server through http - crossdomain.xml is needed for cross-domain accesses, not for same domain accesses.

xmlsocket policy files are required no matter where your swf resides - that's different.

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