3

http://developer.yahoo.com/javascript/howto-proxy.html

この手法に欠点はありますか? プロキシを使用して、XMLHttpRequest を使用して別のドメインで XML または JavaScript を取得できるという利点は明らかです。しかし、他の方法に比べて不利な点があるとは聞いていません。

4

3 に答える 3

4

オーバーヘッド-仲介者を経由しているため、状況は少し遅くなります。

プロキシ経由で外部サイトへのアクセスを許可すると、セキュリティ上の問題が発生します。プロキシするリソースの特定のサイト(およびおそらく特定のURL)にアクセスできるようにしてください。

于 2008-10-08T18:33:12.087 に答える
1

Overhead -- both for the user (who know hsa to wait for you server to make and receive data from the proxied source) and you (as you're now taking on all the traffic for the other server in addition to your own).

Also security concerns -- if you are using a proxy to bypass browser security checks for displaying untrusted content, you are deliberately sabotaging the browser security model -- potentially allowing the user to be compromised -- so unless you absolutely trust the server you are communicating with (that means no random ads, no user defined content in the page[s] you are proxying) you should not do this.

于 2008-10-08T20:16:35.560 に答える
0

セキュリティ上の考慮事項があるかもしれませんが、他の人は私よりもそれに対処する資格がある可能性があります。私はしばらくの間、個人のサイトでそのようなプロキシを実行してきましたが、問題は発生していません。

于 2008-10-08T18:16:14.430 に答える