hapijs / hapi

The Simple, Secure Framework Developers Trust
https://hapi.dev
Other
14.59k stars 1.34k forks source link

How to disable http parsing error logging #4517

Open umutuzgur opened 2 months ago

umutuzgur commented 2 months ago

Runtime

nodejs

Runtime version

18

Module version

21.3.2

Used with

No response

Any other relevant information

No response

How can we help?

We are using detectify to scan for vulnerabilities at our api. The tool tests a variety of cases. It tests for broken http packages and invalid urls. This leads to an uptick of logs like [error] message: Invalid path: or [log,connection,client,error] message: Parse Error: Invalid method encountered, stack: Error: Parse Error: Invalid method encountered. I was wondering if there was a way to stop hapi from printing them

kanongil commented 2 months ago

Setting debug: false at the server level should work.