Skip to content

Commit 2e72cdc

Browse files
committed
fix: correctly format fallback IP with Guid in rate limiter partition key
1 parent 3e63fa0 commit 2e72cdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Dotnet.Samples.AspNetCore.WebApi/Utilities/HttpContextUtilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ public static string ExtractIpAddress(HttpContext httpContext)
4242
return ipAddress.ToString();
4343
}
4444

45-
return httpContext.Connection.RemoteIpAddress?.ToString() ?? "unknown-{Guid.NewGuid()}";
45+
return httpContext.Connection.RemoteIpAddress?.ToString() ?? $"unknown-{Guid.NewGuid()}";
4646
}
4747
}

0 commit comments

Comments
 (0)