Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请求成功返回没数据 #31

Open
spencer17x opened this issue Feb 24, 2019 · 5 comments
Open

请求成功返回没数据 #31

spencer17x opened this issue Feb 24, 2019 · 5 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@spencer17x
Copy link

请求头报警告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
Copy link
Owner

yize commented Feb 26, 2019

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

@yize yize added the wontfix This will not be worked on label Feb 26, 2019
@yize yize self-assigned this Feb 26, 2019
@yize
Copy link
Owner

yize commented Feb 26, 2019

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

http
  // ...
  .headers()
  .contentTypeOptions().disable()

@spencer17x
Copy link
Author

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

@yize
Copy link
Owner

yize commented Feb 26, 2019

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

@MyNameIsLuoShuai
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants