Skip to content
Permalink
Browse files

Enable GET /ip

  • Loading branch information...
int64ago committed Mar 15, 2016
1 parent ef85174 commit 6d9dd963bef070c34307d820462689d2594cec07
Showing with 9 additions and 0 deletions.
  1. +9 −0 app.js
9 app.js
@@ -26,6 +26,15 @@ app.post('/', function(req, res) {
});
});

app.get('/ip', function(req, res){
var ip = req.headers['x-forwarded-for'] ||
req.connection.remoteAddress ||
req.socket.remoteAddress ||
req.connection.socket.remoteAddress;
res.send(ip);
});


app.get('/:shortId', function(req, res) {
var shortId = req.params.shortId;
utils.get(shortId, function(result) {

0 comments on commit 6d9dd96

Please sign in to comment.
You can’t perform that action at this time.