Access-Control-Allow-Origin intercept limit chorom browser (homologous cross-domain issue)

The original part of the reference link: https://www.iteye.com/blog/110shen110-2422408

The original part of the reference link: https://blog.csdn.net/wonking666/article/details/79159180

Problem description: Grilled down today for a complete project, open the folder directly from some js effect does not show, but when the load this file to the compiler (HBuilder), the display now completely normal, f12 inspection reported the following error :

Domain in a broad sense is probably refers to a single domain, but in the professional field, we call it source, the so-called homologous means:

same protocol 1.

2. same domain

3. Port same

three also set up can be called homologous. Same Origin Policy browser from the moment of its birth appeared, in particular:

(generally through ajax request) Gets a resource in domain B from one page under the domain A, it is not allowed browser.

After ask a friend to know because the browser homologous security policy , does not allow direct access from the local interface

  1, open your browser's installation directory chrome, chrome.exe find the file, right-sent to the desktop shortcut;

  2, find a shortcut on the desktop, right-click Properties, click the shortcut tab

  3, modify the target (T) is: "C: \ Program Files ( x86) \ Google \ Chrome \ Application \ chrome.exe" --args --disable-web-security --user-data-dir, then click [ application], OK, and restart the browser

Special Statement: C: \ Program Files (x86) \ Google \ Chrome \ Application \ chrome.exe path for the location of chrome (i.e. properties in the starting position [(S)]), when the display shown below, the configuration is successful, sometimes directly on the local project files right time or select open

Part js effect will not be displayed, click on this time just sent to the desktop chrom.exe open file, then copy and paste the address into the address bar to open just fine

 

Guess you like

Origin www.cnblogs.com/qdkfyym/p/11424373.html