克服跨域问题问题

2023-09-11 00:43:32 作者:不善言语

有什么方法来克服试图违反同源策略,从另一台Web服务器中检索数据的客户端时出现的跨域问题?

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?

推荐答案

而不是直接从客户端引用第三方域名,打电话到你的主机域名,并将服务器检索无论你来自第三方域获得

Instead of referencing a third party domain directly from the client, call up to your hosting domain and have the server retrieve whatever you're getting from the third party domain.