ip-devicer
    Preparing search index...

    Function createIpMiddleware

    • Creates an Express-compatible middleware that resolves the real client IP from X-Forwarded-For / X-Real-IP headers and attaches it to req.resolvedIp.

      This is a standalone utility — it does not call IpManager directly. Use the resolved IP in your route handler when calling deviceManager.identify().

      Parameters

      Returns (
          req: IncomingMessage & { resolvedIp?: string },
          _res: ServerResponse,
          next: NextFunction,
      ) => void