Added missing response headers

This is an essential bug fix for the middleware.