feat(http): move HTTP server configuration application, enable flexible duration formats

This commit applies HTTP server configuration in `rootHttpRouterServiceFactory`
and adds support for multiple duration formats for timeouts. The previous
tests for server config have been moved and refactored. The documentation
and CHANGELOG have been updated to reflect the new configuration structure
and supported formats.

Signed-off-by: Beth Griggs <bethanyngriggs@gmail.com>
This commit is contained in:
Beth Griggs
2025-09-12 15:55:49 +01:00
parent ee06f7d181
commit d501e8c768
9 changed files with 175 additions and 128 deletions
@@ -67,12 +67,18 @@ backend:
serverShutdownDelay: { seconds: 20 }
server:
# (Optional) HTTP server configuration, Node.js defaults apply otherwise
# Timeout values support multiple formats:
# - Numbers (milliseconds): 30000
# - Duration strings: '30s', '1 minute', '2 hours'
# - ISO duration strings: 'PT30S', 'PT1M', 'PT2H'
# - Duration objects: { seconds: 30 }, { minutes: 1 }, { hours: 2 }
headersTimeout: 60000
keepAliveTimeout: 5000
requestTimeout: '30s'
keepAliveTimeout: { seconds: 5 }
timeout: 'PT30S'
# Numeric-only settings
maxHeadersCount: 2000
maxRequestsPerSocket: 100
requestTimeout: 30000
timeout: 30000
```
### Via Code