How to prevent direct access to my JSON service?

前端 未结 6 1615
心在旅途
心在旅途 2020-11-30 10:46

I have a JSON web service to return home markers to be displayed on my Google Map.

Essentially, http://example.com calls the web service to find out the

6条回答
  •  一向
    一向 (楼主)
    2020-11-30 11:29

    Some more specific answers here, but I'd like to make the following general point:

    Anything done over AJAX is being loaded by the user's browser. You could make a hacker's life hard if you wanted to, but, ultimately, there is no way of stopping me from getting data that you already freely make available to me. Any service that is publicly available is publicly available, plain and simple.

提交回复
热议问题