refactor: migrate frontend code -- backend.js -> frontend.js

This commit is contained in:
Rim
2025-04-01 21:35:28 -04:00
parent 0df8728515
commit 2b90e3f567
4 changed files with 407 additions and 386 deletions

1
app.js
View File

@ -895,6 +895,7 @@ app.post("/api/search", async (req, res) => {
}
});
// Improved logging endpoint
app.post('/api/log', (req, res) => {
const clientIP = req.headers['x-forwarded-for'] || req.ip || req.connection.remoteAddress;