The front-end method to achieve cross-domain

1.jsonp
2.cors (node ​​server settings)
3.postMessage (iframe communication)
4.window.name (iframe communication, pages a and b have the same source, but c has different sources; c puts the value in window.name, a Nest c in the iframe in the page, and then change the address of the iframe to b, and the page b can also use window.name)
5.location.hash (using the url value in the iframe with hash value)
6.http-proxy
7.nginx
8. websocket
9. documnet. domain

Guess you like

Origin blog.csdn.net/weixin_44441196/article/details/122800821