-Generally the cross-domain exists only on the browser that has this problem.
-If you encounter cross-domain issues
+ 1. Accept data forwarding via your own server (the following methods are not secure)
+ 2. In the sender's request header, add: Access-control-allow-origin: * (side server support)
+ 3. Send data via JSONP (JSONP is just a data format) (offset server support)
-What is Jsonp
Jsonp (JSON with Padding) is a "usage pattern" of JSON that allows Web pages to fetch data from other domain names (sites), that is, across domains.
Why do we need a special technology (JSONP) to access data from different domains (websites)? This is because of the homologous policy.
The same-origin policy, which is a well-known security policy presented by Netscape, is now used by all JavaScript-enabled browsers.
-If the customer wants to visit: http://www.itcast.com/jsonp.php?jsonp=callbackFunction.
Suppose the customer expects to return JSON data: ["customername1", "customername2"].
the data that is actually returned to the client is displayed as: Callbackfunction (["Customername1", "customername2"]).
About cross-domain issues with angular.js request data