feat: rediseño UI completo + infra email + stats
This commit is contained in:
parent
93d75ddafe
commit
24401c0ee5
37 changed files with 2162 additions and 412 deletions
10
api/app.js
10
api/app.js
|
|
@ -9,6 +9,7 @@ const rateLimit = require('express-rate-limit');
|
|||
const eraseRoute = require('./routes/erase');
|
||||
const gmailOAuth = require('./routes/gmail_oauth');
|
||||
const egosearch = require('./routes/egosearch');
|
||||
const statsRoute = require('./routes/stats');
|
||||
|
||||
const app = express();
|
||||
|
||||
|
|
@ -57,6 +58,15 @@ app.get('/api/egosearch', searchLimit, egosearch);
|
|||
app.get('/api/gmail/auth', emailLimit, gmailOAuth.authInit);
|
||||
app.get('/api/gmail/callback', gmailOAuth.authCallback);
|
||||
|
||||
// Stats públicas (solo contadores anónimos, sin PII)
|
||||
const statsLimit = rateLimit({
|
||||
windowMs: 60 * 1000,
|
||||
max: 30,
|
||||
message: { error: 'Demasiadas peticiones.' },
|
||||
keyGenerator: realIp,
|
||||
});
|
||||
app.get('/api/stats', statsLimit, statsRoute);
|
||||
|
||||
// Health check
|
||||
app.get('/api/health', (req, res) => res.json({ status: 'ok' }));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue