【发布时间】:2018-06-20 18:41:07
【问题描述】:
我正在努力解决一个只在 Chrome 中出现的怪异问题。
我的 Angular SPA 与不同子域 (api.domain.com) 上的 node.js-Backend 通信。为了让它工作,我使用the cors npm package。一切正常,除了 Chrome 中 OPTIONS 预检的下载时间。
Screenshot of OPTIONS slower than PUT
The timing tab shows that most time is spent by downloading content, but there is no Content-Body in my response.
此时间仅发生在 Chrome 中。 Firefox、IE、Edge 和 Opera 不受影响。
我在 docker 容器中使用带有 express 和 cors 的 node.js。前端是一个 Angular 1 SPA。
有人知道如何解决这个问题吗?
【问题讨论】:
标签: javascript angularjs node.js google-chrome cors