Added middleware for handling RECEIPT headers.