mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 06:55:45 +01:00
fixed ipSecurityCheck
This commit is contained in:
@@ -84,11 +84,5 @@ export const ipSecurityCheck = (req: AuthRequest, res: Response, next: NextFunct
|
||||
console.log(`🔐 Auth attempt from IP: ${clientIP}, Path: ${req.path}`);
|
||||
}
|
||||
|
||||
// Block known malicious IPs (you can expand this)
|
||||
const blockedIPs = process.env.BLOCKED_IPS?.split(',') || [];
|
||||
if (blockedIPs.includes(clientIP)) {
|
||||
console.warn(`🚨 Blocked request from banned IP: ${clientIP}`);
|
||||
res.status(403).json({ error: 'Access denied' });
|
||||
return;
|
||||
}
|
||||
next();
|
||||
}
|
||||
Reference in New Issue
Block a user