moleculerjs / moleculer-web

:earth_africa: Official API Gateway service for Moleculer framework
http://moleculer.services/docs/moleculer-web.html
MIT License
292 stars 118 forks source link

add default reqTimeout #312

Closed AndreMaz closed 1 year ago

AndreMaz commented 1 year ago

Fixes https://github.com/moleculerjs/moleculer-web/issues/206

In node.js versions < v18 this was set to 0 (meaning disabled).

However, in the docs it is stated that:

It must be set to a non-zero value (e.g. 120 seconds) to protect against potential Denial-of-Service attacks in case the server is deployed without a reverse proxy in front.

In node.js v18 the default value is 300000 ms = 5 minutes,

This PR uses node.js v18 default value

intech commented 1 year ago

@AndreMaz Thanks so much!