RisingStack / protect

Proactively protect your Node.js web services
MIT License
401 stars 23 forks source link

How to stop requests that have sql injection in the body #15

Open sundriver opened 6 years ago

sundriver commented 6 years ago

Hi There, Thanks for the library.

This is more a question than a issue. How can I stop requests with sql injection in the body of the request.

app.use( protect.express.sqlInjection( { body: true, loggerFunction: console.error } ) )

Above code logs the request, how can I get hold of req,res and next function and stop the next function being called.

Thanks, Ali