【问题标题】:angularjs xdomain socket timeoutangularjs xdomain 套接字超时
【发布时间】:2014-07-11 22:20:00
【问题描述】:

我正在本地机器上运行一个 Angular 应用程序,它通过 CORS 连接到本地 API。应用在 localhost:8000 上运行,API 在 localhost:7999 上运行。

过去我一直依靠xdomain 来处理我的 IE9 兼容性,但这次我没有任何运气。这是来自 IE9 的控制台日志...

LOG: xdomain (localhost:8000): adding slave: 'localhost:7999'

LOG: xdomain (localhost:8000): proxying request to slave: 'localhost:7999'

LOG: xdomain (localhost:8000): creating iframe xdomain-8f12dd3f

LOG: xdomain (localhost:8000): new socket: xdomain-20f6dbf3

xdomain (localhost:8000): Timeout waiting on iframe socket

有其他人遇到过这个问题吗?

【问题讨论】:

    标签: angularjs iframe cors postmessage


    【解决方案1】:

    我有一个非常相似的问题。

    事实证明,我的 proxy.html(xdomain 需要)是通过“X-Frame-Options”标头发送的,这会阻止页面在 xdomain 使用的 iFrame 中工作。

    从您的服务器或 Web 框架上的 proxy.html 中删除“X-Frame-Options”标头应该能够解决您的问题。确保您只是为 proxy.html 删除它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-08
      • 2011-05-11
      • 2013-05-23
      • 2019-07-11
      • 2015-12-07
      • 1970-01-01
      相关资源
      最近更新 更多