Don't log post body in release builds

Closes #28
This commit is contained in:
jvyden 2022-01-16 14:29:36 -05:00
commit 04cdca0d26
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -102,11 +102,14 @@ namespace LBPUnion.ProjectLighthouse
LoggerLevelHttp.Instance
);
#if DEBUG
// Log post body
if (context.Request.Method == "POST")
{
context.Request.Body.Position = 0;
Logger.Log(await new StreamReader(context.Request.Body).ReadToEndAsync(), LoggerLevelHttp.Instance);
}
#endif
}
);