详细配置和报错见图:
–
url为https,端口号443,但没接收到访问消息。后台node服务端相关代码如下:
app.get(’/getCustomerMessage’, function(req, res){
var crypto = require(‘crypto’);
var token=‘3467890646788’
console.log(‘req’,req);
var queryArray=[req.query.timestamp,req.query.nonce,token];
queryArray=queryArray.sort();
var queryArrayString=’’;
for (var k in queryArray){
queryArrayString +=queryArray[k]
};
var signature = crypto.createHash(‘sha1’).update(queryArrayString).digest(‘hex’);
if(signature==req.query.signature){
res.send(req.query.echostr);
}
else{
res.send(‘err’)
};
});