diff --git a/BuildingBlocks/src/BuildingBlocks.API/Mvc/ControllerAttributes/HandleHttpCachingAttribute.cs b/BuildingBlocks/src/BuildingBlocks.API/Mvc/ControllerAttributes/HandleHttpCachingAttribute.cs index dff50d84f2..90c786b7f6 100644 --- a/BuildingBlocks/src/BuildingBlocks.API/Mvc/ControllerAttributes/HandleHttpCachingAttribute.cs +++ b/BuildingBlocks/src/BuildingBlocks.API/Mvc/ControllerAttributes/HandleHttpCachingAttribute.cs @@ -45,7 +45,7 @@ public override async Task OnResultExecutionAsync(ResultExecutingContext context { response.StatusCode = StatusCodes.Status304NotModified; - foreach (var header in response.Headers.Where(h => HEADERS_TO_KEEP_FOR304.Contains(h.Key))) + foreach (var header in response.Headers.Where(h => !HEADERS_TO_KEEP_FOR304.Contains(h.Key))) response.Headers.Remove(header.Key); return;