Skip to content

Instantly share code, notes, and snippets.

@cdollins
Created July 20, 2011 20:08
Show Gist options
  • Save cdollins/1095801 to your computer and use it in GitHub Desktop.
Save cdollins/1095801 to your computer and use it in GitHub Desktop.
app.post('/config', function(req, res) {
console.log('Received Config Push');
//Get Client Name
var name = req.header('X-Forwarded-For');
console.log('Destined for '+ name);
// Get message from POST
req.on('data', function(raw) {
console.log("Data train is here: " + raw);
//Send to NSA
sendPB.sendProto(name, encode(raw, 0));
});
res.send('Configurations Pushed to ' + name);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment