Moved priate IP check to this API