How can I validate/secure/authenticate a JavaScript-based POST request?

前端 未结 10 2082
孤独总比滥情好
孤独总比滥情好 2020-12-14 20:27

A product I\'m helping to develop will basically work like this:

  • A Web publisher creates a new page on their site that includes a
10条回答
  •  旧时难觅i
    2020-12-14 20:57

    If you can add server-side code to the site pushing data to your site, you could use a MAC to at least prevent non-logged in users from sending anything.

    If just anyone is allowed to use the page, then I can't think of a waterproof way of confirming the data without scraping the webpage. You can make sending arbitrary content somewhat more difficult with referer checks and whatnot, but not 100% impossible.

提交回复
热议问题