How do I secure web services when using JSON via JQuery?

I am currently using asmx for Json transactions using JQuery.

How can I protect it from accessing other sites and make it exclusive only through my domain?

+2


source to share


1 answer


Make sure the requestor:

  • HTTP_REFERER is installed on your site; and
  • a valid cookie for your site.


This will prevent behavior that most closely resembles hotlinking. However, if the site uses the HTTP library to consume your web service and it is publicly available, there is not much you can do outside of IP throttling and similar techniques.

+3


source







All Articles