1
0
Fork 0
mirror of https://git.sr.ht/~roxwize/mipilin synced 2025-05-10 23:33:07 +00:00
Signed-off-by: roxwize <rae@roxwize.xyz>
This commit is contained in:
Rae 5e 2025-01-28 23:31:31 -05:00
parent 65c29b0564
commit ccc894dc33
Signed by: rae
GPG key ID: 5B1A0FAB9BAB81EE
10 changed files with 111 additions and 41 deletions

View file

@ -59,7 +59,12 @@ object-src 'none'; base-uri 'none';"
return next();
});
app.use((req, res, next) => {
console.log(`${req.ip.padEnd(24)} ${req.method.padStart(8)} ${req.path}`);
let s = "";
for (const [k, v] of Object.entries(req.query))
s += `${k}=${v}&`;
s = s.slice(0, -1);
console.log(`${req.ip.padEnd(24)} ${req.method.padStart(8)} ${req.path}${s ? "?" + s : ""}`);
return next();
})