Skip to content

Commit

Permalink
Don't error if ebox address omits '@Domain:port'
Browse files Browse the repository at this point in the history
  • Loading branch information
who-biz committed Apr 26, 2023
1 parent e9ef71d commit 13ab093
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app_mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,15 @@ function listener(requestUrl, res){

console.log("OK")

let from = json.address.split('@')
from = from[0]
var from;
let split = json.address.search('@');
if (split >= 0) {
from = json.address.split('@')
from = from[0]
} else {
from = json.address;
}
console.log("from = " + from);

// here we check address!!!

Expand Down

0 comments on commit 13ab093

Please sign in to comment.