private static Request ExtractRequestData(IOwinContext owinContext, MemoryStream requestBodyStream) { var data = new Request { Headers = HttpInspector.CollectHeadersSafely(owinContext.Request.Headers.ToDictionary( kvp => kvp.Key.ToLowerInvariant(), kvp => kvp.Value.ToArray())), Uri = owinContext.Request.Uri.ToString(), Method = owinContext.Request.Method, Body = !SensitiveUrls.Contains(owinContext.Request.Uri.AbsolutePath) ? requestBodyStream.ReadAsString() : HttpInspector.RemoveSensitiveData(requestBodyStream.ReadAsString()) }; return(data); }
public string then(string input) { return(HttpInspector.RemoveSensitiveData(input)); }