Beispiel #1
0
        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);
        }
Beispiel #2
0
 public string then(string input)
 {
     return(HttpInspector.RemoveSensitiveData(input));
 }