This commit is contained in:
2023-02-05 11:35:05 -06:00
parent f7cbb48cc2
commit d5a186379d
4 changed files with 3 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ public class UserController : ControllerBase
/// <returns></returns>
[AllowAnonymous]
[HttpGet("LoginAsGuest")]
public async Task<IActionResult> GuestLogin([FromQuery] string returnUrl)
public async Task<IActionResult> GuestLogin([FromQuery] string? returnUrl)
{
var principal = await this.claimsTransformation.CreateClaimsFromGuestPrincipal(User);
if (principal != null)

View File

@@ -43,7 +43,7 @@ namespace Shogi.Api
app.UseWhen(
// Log anything that isn't related to swagger.
context => ShouldLog(context),
context => IsNotSwaggerUI(context),
appBuilder => appBuilder.UseHttpLogging());
// Configure the HTTP request pipeline.
@@ -69,7 +69,7 @@ namespace Shogi.Api
app.Run();
static bool ShouldLog(HttpContext context)
static bool IsNotSwaggerUI(HttpContext context)
{
var path = context.Request.GetEncodedPathAndQuery();