Util method for detecting external endpoint