+ 7

How do I verify the requests on javascript and nodejs?

I am working on my own ad network and I want that the requests to the server cannot be initiated by the user but only by the code Of course, seeing the network panel in chrome devtools anyone can easy analyse what path the request goes and what it does This can lead to sending of fake requests. How can I prevent this? Note: I've heard that one can use csurf tokens for this purpose but even then I have trust issues like the token provided can even be copied by the user and send with their manual request so, how can I be safe from these types of attacks? Please help me...

2nd Dec 2022, 4:13 PM
Sancho Godinho
Sancho Godinho - avatar
3 ответов
+ 5
There's never a 100% safe way to stop everyone from doing the wrong thing, especially for things online. The harder you make it, the more you might discourage a larger amount of (lazier/opportunistic) people. The determined person will see it as a challenge.
2nd Dec 2022, 5:08 PM
Ausgrindtube
Ausgrindtube - avatar
+ 3
Ausgrindtube I tried to solve it also do you know how to implement csurf? The current express csuef package is depriciated so which other csurf libraries can be used and how?
3rd Dec 2022, 12:38 AM
Sancho Godinho
Sancho Godinho - avatar
- 2
Ssijcie jaja starca
4th Dec 2022, 3:05 AM
Adrian Włochowicz
Adrian Włochowicz - avatar