"Chrome can not display the network in the OPTIONS request" solution


#accident scene

In the front end of a cross-domain request transmission time, transmits a first request options, so that the server know whether to allow the cross-domain request.

Cross-Origin Resource Sharing standard adds a set of HTTP header fields, which allows the server to declare the source station has permission to access what resources. Additionally, regulatory requirements, may produce adverse effects on those data to the server HTTP request method (in particular, other than the HTTP request GET, or with a certain MIME type POST request), the browser must first use the OPTIONS method to initiate a request for pre-screening ( preflight request), so that the server know whether to allow the cross-domain request. After the server acknowledges permission before initiating the actual HTTP request. In return preflight request, the server can inform the client, whether you need to carry identity documents (including Cookies and HTTP authentication-related data).

When the actual code debugging and found that the network is not visible chrome OPTIONS request, but with wireshark capture is possible to see the OPTIONS request, and checked under the chrome, there is no set Filter, This is strange! ! !

# Analysis and Solutions

  • Analysis of
    switching to another browser debugging, you can see the OPTIONS request, indicating that the set of issues chrome;
  • Solution
    in the address bar chrome total input chrome://flags/#out-of-blink-cors
    Here Insert Picture Description
    to set it to Disabled, and you can restart chrome;

#reference


Guess you like

Origin www.cnblogs.com/willingtolove/p/12350429.html