4 ms·
It checks x-powered-by and Server in some cases. https://github.com/dotheyusenode/dotheyusenode/blob/master/checkers/headers.js#L3 https://github.com/dotheyusen
by wlaurance 13y ago
It checks x-powered-by and Server in some cases. https://github.com/dotheyusenode/dotheyusenode/blob/master/checkers/headers.js#L3 https://github.com/dotheyusenode/dotheyusenode/blob/master/c...
It also tries to read through the Javascript served up to see if it uses browserify. https://github.com/dotheyusenode/dotheyusenode/blob/master/checkers/needsjs/browserify.js#L1 https://github.com/dotheyusenode/dotheyusenode/blob/master/c...
But yes it is a glorified `curl -I www.foo.com | grep -i 'x-powered-by` UI
- laumars 13y agoTechnically it's more like "curl -i" rather than "-I" since it does a GET request rather than a HEAD request. Which is a good thing as the former is more accurate. There are rare occasions when a web server might be sending wrong headers which get overwritten with the correct headers from the executing code (I think one of OVH's portals suffered from this issue - though that may have since been fixed) You probably might want to stick "-s" in there too; silence the transfer statistics which curl (annoyingly) adds when output is piped / redirected.
- wlaurance 13y agoI should clarify that I am using the request module to make GET requests on the url submitted. But yes, I dislike that the curl stats print by default when output is redirected :/
- laumars 13y ago> I should clarify that I am using the request module to make GET requests on the url submitted. Yeah I saw (I had a browse through your source after your previous post). As a side note, I was impressed with just how readable your code was (even for someone like myself with very poor Javascript skills). I can't comment on how much credit node.js deserves for that, but I've seen people turn even the most readable of languages into line noise in the past. So it's always a pleasure to read code that doesn't require lines of comments to explain their function.
- wlaurance 13y agoThanks! Node can thanked because it makes writing modular code painless, so separating concerns is very easy.