diff --git a/index.js b/index.js index 9378af2..28090c7 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,12 @@ const ws_ = []; const app = express(); app.set('trust proxy', true); +app.use((req, res, next) => { + // Request logger for debugging + console.log(`[${new Date().toLocaleString()}] ${req.method} ${req.path} from ${req.ip} with ${JSON.stringify(req.body)}`); + next(); +}); + app.put('/api/connect/:jobid', (req, res) => { var id = btoa(Crypto.randomBytes(10).toString('base64').slice(0, 10)).replaceAll("=", ""); ws_[id] = {};