add remoteAddress fallback
This commit is contained in:
parent
9ab1699e41
commit
991217efad
2
app.js
2
app.js
@ -68,7 +68,7 @@ function textRequestHandler(req, res, number, region, key) {
|
|||||||
res.send({success:false, message:'Number and message parameters are required.'});
|
res.send({success:false, message:'Number and message parameters are required.'});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var ip = req.header('X-Real-IP');// || req.connection.remoteAddress;
|
var ip = req.header('X-Real-IP') || req.connection.remoteAddress;
|
||||||
|
|
||||||
var message = req.body.message;
|
var message = req.body.message;
|
||||||
if (message.indexOf(':') > -1) {
|
if (message.indexOf(':') > -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user