Add input validation and add advanced logging

- Implemented input validation for binary paths, hostnames, and ports to enhance security
- Added winston-based advanced logging with debug, info, warn, and error levels
- Configured logging to output to both console and server.log file
- Included request context and unique request IDs in logs
- Fixed binary path validation to allow /home/go/status and added existence checks
This commit is contained in:
MCHost
2025-07-03 01:29:19 -04:00
parent 28d9d8aff5
commit e7d81ad5a3
3 changed files with 139 additions and 7 deletions

View File

@ -12,7 +12,10 @@
"@tailwindcss/cli": "^4.1.11",
"dotenv": "^16.4.5",
"express": "^4.21.0",
"express-rate-limit": "^7.5.1"
"express-rate-limit": "^7.5.1",
"helmet": "^8.1.0",
"validator": "^13.15.15",
"winston": "^3.17.0"
},
"devDependencies": {
"nodemon": "^3.1.7",