Web Finger printing is something that lets us to uniquely identify a browser execution which in case if to be done on an non logged in environment.
Usual sources for web finger printing are
User Agent
HTTP_ACCEPT Headers
GEO-ip
There is an express middleware which is helping to implement the finger printing and it is like below
var Fingerprint = require('express-fingerprint')
app.use(Fingerprint({
parameters:[
// Defaults
Fingerprint.useragent,
Fingerprint.acceptHeaders,
Fingerprint.geoip,
// Additional parameters
function(next) {
// ...do something...
next(null,{
'param1':'value1'
})
},
function(next) {
// ...do something...
next(null,{
'param2':'value2'
})
},
]
}))
app.get('*',function(req,res,next) {
// Fingerprint object
console.log(req.fingerprint)
})
References:
https://www.npmjs.com/package/express-fingerprint
No comments:
Post a Comment