【问题标题】:Iframed angular 6 app XHR response CORB warning in Chrome if response contains "x-content-type-options: nosniff" header如果响应包含“x-content-type-options:nosniff”标头,Chrome 中的 Iframed angular 6 app XHR 响应 CORB 警告
【发布时间】:2019-09-11 14:42:00
【问题描述】:

当将标头添加到后端响应(实际上在 nginx 中)时,是否有人在 iframed 角度(在我的情况下为 6)中的 xhr 请求存在此问题:

x-content-type-options: nosniff

跨域读取阻止 (CORB) 阻止了 MIME 类型为 text/html 的跨域响应 https://my_back_end_url。详情请见https://www.chromestatus.com/feature/5629709824032768。

但内容类型响应正常:

content-type: application/json

如果我删除 nosniff 标头 - 一切正常,没有警告

这里是带有演示和重现代码的仓库:这里是带有重现代码的仓库:https://github.com/kievsash/NoSniffOptionTest

【问题讨论】:

    标签: angular google-chrome xmlhttprequest


    【解决方案1】:

    Chrome 错误 https://bugs.chromium.org/p/chromium/issues/detail?id=945767

    按照google人的话会修到77个版本

    【讨论】:

      猜你喜欢
      • 2011-06-21
      • 2022-06-25
      • 2023-02-10
      • 2015-04-17
      • 1970-01-01
      • 1970-01-01
      • 2014-07-31
      • 2011-02-03
      • 1970-01-01
      相关资源
      最近更新 更多