Created
August 13, 2014 13:50
-
-
Save janez89/e6be1939f475d03f5cd1 to your computer and use it in GitHub Desktop.
NodeJS - favicon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
http.createServer(function (req, res) { | |
// favicon spam | |
if (req.url == '/favicon.ico') { | |
res.writeHead(404); | |
return res.end(); | |
} | |
// another response | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment