Skip to content

Instantly share code, notes, and snippets.

@notcome
Created October 21, 2014 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notcome/a94e6c0c95cff41c8a10 to your computer and use it in GitHub Desktop.
Save notcome/a94e6c0c95cff41c8a10 to your computer and use it in GitHub Desktop.
Simplest way to implement parental control in Qujing.
var http = require('http');
var server = http.createServer(onRequest);
function onRequest (req, res) {
res.writeHead(403, 'You are forbidden to visit this page due to Qujing\'s parental control.');
res.write('You are forbidden to visit this page due to Qujing\'s parental control.');
res.end();
}
server.listen(60001);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment