removed unnecessary comments

This commit is contained in:
2025-11-01 15:22:47 +01:00
parent 72430462f6
commit 07ab9586cc
14 changed files with 26 additions and 28 deletions

View File

@@ -53,7 +53,6 @@ export const requireRole = (roles: string[]) => {
};
};
// Add this function to your existing auth.ts
export const getClientIP = (req: Request): string => {
const trustedHeader = process.env.TRUSTED_PROXY_HEADER || 'x-forwarded-for';
const forwarded = req.headers[trustedHeader];
@@ -74,7 +73,6 @@ export const getClientIP = (req: Request): string => {
return req.socket.remoteAddress || req.ip || 'unknown';
};
// Add IP-based security checks
export const ipSecurityCheck = (req: AuthRequest, res: Response, next: NextFunction): void => {
const clientIP = getClientIP(req);