hwo to cehck req header in js

JavaScript
var host = req.headers['host']; 
Source

Also in JavaScript: