15 Ağustos 2010 Pazar

Today's gain is about XMLHTTPRequest to other server.

Today I was working on parsing a XML document that is coming from one of the Google servers. I wanted to use one of the datum in my map processing program and I was really happy since I could get such info. from Google server. However, suddenly and sadly :( I realized that XMLHTTPRequest the my most trusted tool cannot talk with another server beside mine because of the security reasons. Thus, I started to search about this problem on internet as a Google oriented computer engineer and I found three solution. I will give some little explanations not all implementations. If you wan to get more please ask to internet.

1-)(most common one) The best approach is having a server-side proxy that receives Ajax requests, and in turn, sends HTTP requests to other servers. This should be carefully implemented by sanitizing input and whitelisting the types of requests that are sent, and the servers that are contacted.
2-)If you are using apache server, configure your server to be able to give permission for such connection
3-) What you can do as a third is dynamically create a SCRIPT tag and reference an external address

choose one and search it... good luck :)

Hiç yorum yok:

Yorum Gönder