is it possible to determine the server from which ajax request is send??, and if yes then how could i determine and execute only those requests which are from my server..
+3
A:
aeh, you're mixing server/client stuff (like so many others). i could misinterpret your question in 3 ways:
unfunny joke
it's possible to determine the server serving the ajax response. if the request goes tohttp://www.example.com/foo.bar?id=boo
, the serving servers name may bewww.example.com
(unless you're the victim of DNS hijacking).possible, but improbable
if you want your server to response only to your personal client (=browser), then filter by ip. if you got a static ip. and maybe authentication over a secure connection.most likley
if you want to serve ajax requests from your server only to sites originating from your server, you have to do authentication (via basic auth or sessions).
Schnalle
2009-06-04 06:48:52
1 is not so unfunny )). 3 is really most likely and basic auth imho is the best and the most simple for this case.
Jet
2009-06-04 10:47:26