Show query arguments in http log

This commit is contained in:
jvyden 2021-10-06 13:51:48 -04:00
commit c806b3bf6b
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -37,10 +37,10 @@ namespace ProjectLighthouse {
// Logs every request and the response to it
// Example: "200: GET /LITTLEBIGPLANETPS3_XML/news"
// Example: "404: GET /asdasd"
// Example: "404: GET /asdasd?query=osucookiezi727ppbluezenithtopplayhdhr"
app.Use(async (context, next) => {
await next(); // Handle the request so we can get the status code from it
Console.WriteLine($"{context.Response.StatusCode}: {context.Request.Method} {context.Request.Path}");
Console.WriteLine($"{context.Response.StatusCode}: {context.Request.Method} {context.Request.Path}{context.Request.QueryString}");
});
app.UseRouting();