Overcoming Cross-Domain issues

前端 未结 3 1492
日久生厌
日久生厌 2021-01-25 13:03

Are there any ways to overcome the cross domain issues that occur when attempting to retrieve data client-side from another web server in violation of the Same Origin policy?

3条回答
  •  猫巷女王i
    2021-01-25 13:47

    I concur with Greg D, it is easy enough to make an AJAX call to a script on your domain that uses curl to fetch a resource from another domain. Just remember that you will most likely want to cache the fetched file on your server so you don't have to go get it every single time a page is viewed.

提交回复
热议问题