Removing hardcoding for service endpoint (localhost)