Chrome not showing OPTIONS requests in Network tab

两盒软妹~` 提交于 2019-11-27 18:07:37

问题


My web client application is setting HTTP POST requests via fetch API.

I see that OPTIONS preflight requests are sent via debugging proxy (Charles Proxy), but they are not displayed in Google Chrome Developer Tools\Network tab.

I don't have any filters setup on the network tab. I remember OPTIONS requests being visible there, but not anymore. How do I bring them back?


回答1:


You'll need to go to: chrome://flags/#out-of-blink-cors, disable the flag, and restart Chrome.

This is an expected behavior change according to: https://bugs.chromium.org/p/chromium/issues/detail?id=995740#c1

I originally came across this via: https://support.google.com/chrome/thread/11089651?hl=en




回答2:


I noticed the same thing. I get an error in Console:

Access to XMLHttpRequest at 'https://api.somedomain.com' from origin 'http://www.someotherdomain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

This started happening for me on the last update of Chrome (to 76). I don't know what I was on previously but I restart my browser often.

Here is the response from HAR

{
   "status":0,
   "statusText":"",
   "httpVersion":"",
   "headers":[

   ],
   "cookies":[

   ],
   "content":{
      "size":0,
      "mimeType":"x-unknown"
   },
   "redirectURL":"",
   "headersSize":-1,
   "bodySize":-1,
   "_transferSize":0,
   "_error":"net::ERR_FAILED"
}


来源:https://stackoverflow.com/questions/57410051/chrome-not-showing-options-requests-in-network-tab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!