Use Werkzeug http_date for date formatting rather than custom code
Add expire headers after making the response

Avoid adding expire headers as CORS headers might return HTTP 400
Updated tests with mocked date