peer-devicer - v0.1.3
    Preparing search index...

    Function createPeerMiddleware

    • Create an Express/Connect-compatible middleware that attaches a PeerIdentifyContext to req.peerContext on every request.

      // Register ip-devicer and tls-devicer middleware first so their enriched
      // fields (req.resolvedIp, req.tlsProfile) are available here.
      app.use(createIpMiddleware());
      app.use(createTlsMiddleware());
      app.use(createPeerMiddleware());

      app.post('/identify', async (req, res) => {
      const result = await deviceManager.identify(req.body, req.peerContext);
      });

      Returns (req: PeerRequest, _res: ServerResponse, next: NextFunction) => void