yize / xswitch

A Chrome Extension for redirecting/forwarding request urls
https://chrome.google.com/webstore/detail/xswitch/idkjhjggpffolpidfkikidcokdkdaogg
MIT License
990 stars 118 forks source link

请求成功返回没数据 #31

Open spencer17x opened 5 years ago

spencer17x commented 5 years ago

请求头报警告Provisional headers are shown; 之前用着都正常的,突然就挂了,请求返回200OK,但是没数据,控制台报警告jquery-3.3.1.min.js:2 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://xcx.hexiaoxiang.com/api/classroom/experience with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details. send @ jquery-3.3.1.min.js:2 ajax @ jquery-3.3.1.min.js:2 (anonymous) @ (index):15 接口测试正常,前端代码也正常。

yize commented 5 years ago

目前收到比较多的这个问题了,可以先使用 Chrome Canary 版本。估计 Chrome 正式版有什么东西改坏了。最近没有动到这块的逻辑。

yize commented 5 years ago

如果更换成 Canary 不能解决问题,看看是否是后端的安全机制更新问题。

http
  // ...
  .headers()
  .contentTypeOptions().disable()
spencer17x commented 5 years ago

http // ... .headers() .contentTypeOptions().disable() 是在后端代码写吗?还是前端直接写在JS里面?

yize commented 5 years ago

后端的,不过这个只是示意,具体方案可以 google 下。先排除 Chrome 正式版的问题。

MyNameIsLuoShuai commented 5 years ago

解决没 我也碰到这个问题了