The solution of Ajax cross-domain problem is divided into 3 kinds:
1. Browser restrictions
Solution: Don't let the browser make restrictions
Workaround: Let the browser not do cross-domain validation by specifying parameters
Evaluation: The value is not big, need everyone to make changes, and change is the client's changes
2.XHR Request
Solution: Do not use XHR
Workaround: JSONP
Cons: Unable to meet existing development requirements
3. Cross-domain (important)
Solution Ideas:
(1) The callee modifies the code so that it supports cross-domain
(2) Caller hides cross-domain
Solution Ideas:
(1) By modifying the returned information, the callee adds some fields that allow callers to call, allowing cross-domain validation as long as cross-domain checksums are passed through the browser
(2) Use the proxy to transfer to the specified URL
An approach to the problem of Ajax cross-domain