How do I restrict JSON access?

前端 未结 8 730
时光取名叫无心
时光取名叫无心 2020-11-30 23:24

I have a web application that pulls data from my newly created JSON API.

My static HTML pages dynamically calls the JSON API via JavaScript from the static HTML page

8条回答
  •  天命终不由人
    2020-12-01 00:25

    Sorry, maybe I'm wrong but... can it be made using HTTPS?

    You can (?) have your API accessible via https://example.com/json/?var1=x&var2=y, thus only authenticated consumer can get your data...

提交回复
热议问题