1st.What is the best way on sending information from the backend to frontend. I've seen a lot of people saying that the best way is with ajax, putting them into variables and replacing the data in the html. Others say sending data from express with res.render('something', {here:data}); But I don't know the correct way. Also, in case I use ajax, how I can deny using the link if a user is not the actual owner.2nd.If I need to serve data into a db with ajax, how I can prevent people spamming those links.Example: I have a link api.com/analytics/update there, I send a POST request with a payload. This is executed in a public way, like a pixel on the site. How I can prevent people from sending unlimited manual data with curl or postman.THanks for your help!
Submitted July 16, 2019 at 01:17AM by ricardorm0
No comments:
Post a Comment