Reputation:
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..
Upvotes: 0
Views: 253
Reputation: 18549
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 to http://www.example.com/foo.bar?id=boo
, the serving servers name may be www.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).
Upvotes: 3