javascriptsecuritypostfrontendbackend

Performance vs. Safety in backend and frontend


Im in that curious moment, when I have to decide whether I'd like to improve perfmormence of my app or it's safety.

By improving safety I mean - validating the input's value's before using POST method to the server, to check if the user didn't change value's of input's inside of them.

I've seen, that while using Laravel + Vue.js, when user attempt's to change the value of the data inside POST method in app.js file (bundled everything with Vue.js), the website crashes, so it look's like front user can't do much.

So is it safe to leave Ajax request's (like Axios) without extra validation in Backend?


Solution

  • You should always add validation on the Backend. Because requests can be done directly to the server using something like curl without even touching your front-end interface.