Beispiel #1
0
        private static void RemoveHeaders(MessageContext context, IEnumerable <string> forbiddenHeaders)
        {
            var headersToRemove = context.Headers.Select(x => x.Key).Intersect(forbiddenHeaders);

            foreach (var headerKey in headersToRemove)
            {
                context.DeleteHeader(headerKey);
            }
        }