Created
January 17, 2012 23:07
-
-
Save anatoliychakkaev/1629664 to your computer and use it in GitHub Desktop.
Blackout middleware for express, railwayjs
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
app.use(function blackoutMiddleware(req, res) { | |
// obtain static html here: http://www.zachstronaut.com/lab/text-shadow-box/stop-sopa.html | |
// or here: https://raw.github.com/zachstronaut/stop-sopa/master/index.html | |
fs.readFile('./public/stopSOPA.html', function (err, file) { | |
res.send(file.toString(), 503); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
res.sendfile() :p