3 ms·
Doesn't the edit box's display logic run in the browser? If you get a POST request from me, how do you know I sent it through visiting your web page instead of
by thaumasiotes 13y ago
Doesn't the edit box's display logic run in the browser? If you get a POST request from me, how do you know I sent it through visiting your web page instead of from curl?
- mcintyre1994 13y agoIn general, you don't. A common method to ensure it comes from a web page is Cross Site Request Forgery (CSRF) protection, which you'll probably want to look up if you're interested. In short, it uses a hidden form field sent with the data, and usually duplicated in a cookie. When you submit the form, the hidden field data and the cookie data are compared, if they match it can be assumed you posted via the web page. Sorry if that's not what you were asking, and note there are lots of different ways to do this, that's just one example.