简体   繁体   中英

Overcoming Cross-Domain issues

是否有任何方法可以克服在尝试从另一个Web服务器检索数据客户端时违反同源策略时发生的跨域问题?

不是直接从客户端引用第三方域,而是调用您的托管域并让服务器检索您从第三方域获得的任何内容。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM