Receiving 'Cross-Origin Request Blocked' message with altered function call