private void ApplyResponseHeaders(HttpResponse response, IDocumentHandler handler) { response.ContentType = "text/html"; response.StatusCode = handler.StatusCode; var headers = response.GetTypedHeaders(); headers.LastModified = handler.LastModified; headers.CacheControl = new Microsoft.Net.Http.Headers.CacheControlHeaderValue() { MaxAge = _options.CacheMaxAge, Public = true }; }