curl middleware and removing the logging of the rebuild database