Skip to content

Commit 286a0ad

Browse files
Update summary and params for the WithClientIp extension method (#43)
1 parent 315aff4 commit 286a0ad

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/Serilog.Enrichers.ClientInfo/Extensions/ClientInfoLoggerConfigurationExtensions.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,13 @@ namespace Serilog;
1111
public static class ClientInfoLoggerConfigurationExtensions
1212
{
1313
/// <summary>
14-
/// Registers the client IP enricher to enrich logs with client IP with 'X-forwarded-for'
15-
/// header information.
14+
/// Registers the client IP enricher to enrich logs with <see cref="Microsoft.AspNetCore.Http.ConnectionInfo.RemoteIpAddress"/> value.
1615
/// </summary>
1716
/// <param name="enrichmentConfiguration">The enrichment configuration.</param>
18-
/// <param name="headerName">
19-
/// Set the 'X-Forwarded-For' header in case if service is behind proxy server. Default value
20-
/// is 'x-forwarded-for'.
21-
/// </param>
2217
/// <exception cref="ArgumentNullException">enrichmentConfiguration</exception>
2318
/// <returns>The logger configuration so that multiple calls can be chained.</returns>
2419
public static LoggerConfiguration WithClientIp(
25-
this LoggerEnrichmentConfiguration enrichmentConfiguration,
26-
string headerName = "x-forwarded-for")
20+
this LoggerEnrichmentConfiguration enrichmentConfiguration)
2721
{
2822
if (enrichmentConfiguration == null)
2923
{
@@ -85,4 +79,4 @@ public static LoggerConfiguration WithRequestHeader(this LoggerEnrichmentConfigu
8579

8680
return enrichmentConfiguration.With(new ClientHeaderEnricher(headerName, propertyName));
8781
}
88-
}
82+
}

0 commit comments

Comments
 (0)