diff --git a/GuildWarsPartySearch/Endpoints/LiveFeed.cs b/GuildWarsPartySearch/Endpoints/LiveFeed.cs index 15e284f..656cf46 100644 --- a/GuildWarsPartySearch/Endpoints/LiveFeed.cs +++ b/GuildWarsPartySearch/Endpoints/LiveFeed.cs @@ -39,7 +39,7 @@ await this.SendMessage(new PartySearchList public override async Task SocketAccepted(CancellationToken cancellationToken) { - var ipAddress = this.Context?.GetClientIP(); + var ipAddress = this.Context?.Request.HttpContext.GetClientIP(); var scopedLogger = this.logger.CreateScopedLogger(nameof(this.SocketAccepted), ipAddress ?? string.Empty); if (!await this.liveFeedService.AddClient(this.WebSocket!, ipAddress, this.Context?.GetPermissionLevel() ?? Models.PermissionLevel.None, cancellationToken)) { diff --git a/GuildWarsPartySearch/Middleware/IPExtractingMiddleware.cs b/GuildWarsPartySearch/Middleware/IPExtractingMiddleware.cs index 6cf6638..90fd01a 100644 --- a/GuildWarsPartySearch/Middleware/IPExtractingMiddleware.cs +++ b/GuildWarsPartySearch/Middleware/IPExtractingMiddleware.cs @@ -21,8 +21,6 @@ public async Task InvokeAsync(HttpContext context, RequestDelegate next) { var address = context.Connection.RemoteIpAddress?.ToString(); var scopedLogger = this.logger.CreateScopedLogger(nameof(this.InvokeAsync), address ?? string.Empty); - scopedLogger.LogDebug($"Received request"); - if (context.Request.Headers.TryGetValue(CFConnectingIPHeaderKey, out var cfConnectingIpValues)) { scopedLogger.LogDebug($"CF-Connecting-IP {string.Join(',', cfConnectingIpValues.Select(s => s))}"); diff --git a/GuildWarsPartySearch/Middleware/PermissioningMiddleware.cs b/GuildWarsPartySearch/Middleware/PermissioningMiddleware.cs index c4de733..be871e1 100644 --- a/GuildWarsPartySearch/Middleware/PermissioningMiddleware.cs +++ b/GuildWarsPartySearch/Middleware/PermissioningMiddleware.cs @@ -24,7 +24,6 @@ public async Task InvokeAsync(HttpContext context, RequestDelegate next) { var address = context.Connection.RemoteIpAddress?.ToString(); var scopedLogger = this.logger.CreateScopedLogger(nameof(this.InvokeAsync), address ?? string.Empty); - scopedLogger.LogDebug($"Received request"); if (context.Request.Headers.TryGetValue(XApiKeyHeaderKey, out var xApiKeyvalues)) { scopedLogger.LogDebug($"X-Api-Key {string.Join(',', xApiKeyvalues.Select(s => s))}");