mirror of
https://git.sr.ht/~roxwize/mipilin
synced 2025-05-10 23:33:07 +00:00
admining
Signed-off-by: roxwize <rae@roxwize.xyz>
This commit is contained in:
parent
65c29b0564
commit
ccc894dc33
10 changed files with 111 additions and 41 deletions
7
main.ts
7
main.ts
|
@ -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();
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue