diff --git a/docs/EXPRESS_SERVER.MD b/docs/EXPRESS_SERVER.MD index fbec6267..2524455c 100644 --- a/docs/EXPRESS_SERVER.MD +++ b/docs/EXPRESS_SERVER.MD @@ -24,7 +24,7 @@ const hasBotResult = (result) => { // create middleware const middlewareDetect = (req, res, next) => { const useragent = req.headers['user-agent']; - const clientHintsData = clientHints.parse(res.headers); + const clientHintsData = clientHints.parse(req.headers); req.useragent = useragent; req.device = deviceDetector.detect(useragent, clientHintsData); @@ -46,4 +46,4 @@ app.get('/detect', (req, res) => { app.listen(port, () => { console.log('server listen port %s', port); }) -``` \ No newline at end of file +```