How to restrict access to my web service?
Posted
by Hank
on Stack Overflow
See other posts from Stack Overflow
or by Hank
Published on 2010-04-05T13:41:01Z
Indexed on
2010/04/05
13:43 UTC
Read the original article
Hit count: 322
I have http://example.com/index.html
, which from within the HTML uses JavaScript to call a web services at http://example.com/json/?a=...&b=...
The web service returns to index.html
a JSON array of information to then be displayed on index.html
.
Since anyone can view the source code for index.html
and see how I'm calling the JSON web services (http://example.com/json/
), how do I prevent people from calling my JSON web service directly?
Since the web service is essentially an open read into my database, I don't want people to abuse the web service and start DoS my server, fetching more information than they should, etc..
© Stack Overflow or respective owner