Skip to content

Instantly share code, notes, and snippets.

@tanepiper

tanepiper/foo.js Secret

Created August 16, 2012 09:19
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 tanepiper/2bd941d7e0101692135d to your computer and use it in GitHub Desktop.
Save tanepiper/2bd941d7e0101692135d to your computer and use it in GitHub Desktop.
server.mount({path: /\/s.gif|\/s.json/}, function(req, bounce) {
var res = bounce.respond();
res.statusCode = 302;
res.setHeader('location', req.headers.host + '/pb');
res.end();
return true;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment