我的Google Chrome无法显示"OPTIONS"请求 [英] My Google chrome doesn't show OPTIONS requests
问题描述
很多天前,我更改了"Google Chrome浏览器网络"标签的配置,以显示方法".
Many days ago I change Google Chrome Network tab configuration to show Methods.
如果我的原始ajax请求URL与目标ajax请求URL不完全相同,那么一切都可以,浏览器(Google Chrome)发送一个OPTIONS请求,以确保可以安全地发送主要请求.
Everythings were okay if my origin ajax request URL was not exactly like destination ajax request URL the browser (Google Chrome) send an OPTIONS request to be sure it is secure to send the main request.
因此,在[网络]标签中,我们可以看到OPTIONS调用,如果响应变为200,则浏览器将发送主要请求,就像下面这样:
So in the Network tab, we can see OPTIONS call and if its response became 200 the browser send the main request, I expect just like below:
但是在我的Google Chrome浏览器中,它发送了OPTIONS呼叫,并在获得200个后发送了主要呼叫,但是在网络"标签中没有显示OPTIONS呼叫.
But in my Google Chrome, it sent the OPTIONS calls and after getting 200 send the main call but doesn't show OPTIONS call in network tab.
我的谷歌浏览器(我在下面看到):
My google chrome (I see below):
如何修复我的Google Chrome,以便在网络"标签中看到OPTIONS呼叫?
推荐答案
Actually, the right answer is in this link.
如果有人想看到OPTIONS呼叫,则应该:
If anyone wanna see OPTIONS call should:
- 在Google Chrome浏览器中打开一个新标签页
- 输入此内容:
chrome://flags/#out-of-blink-cors
- 禁用
眨眼CORS
- 重新启动Google Chrome
- 现在您可以看到OPTIONS通话
这篇关于我的Google Chrome无法显示"OPTIONS"请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!