title: How to block external http requests? (securing AJAX calls)
body: <p>I want to use post to update a database and don't want people doing it manually, i.e., it should only be possible through AJAX in a client. Is there some well known cryptographic trick to use in this scenario?</p>
  
  <p>Say I'm issuing a GET request to insert a new user into my database at <code>site.com/adduser/&lt;userid&gt;</code>. Someone could overpopulate my database by issuing fake requests.</p>