File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
src/Serilog.Enrichers.ClientInfo/Extensions Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -11,19 +11,13 @@ namespace Serilog;
11
11
public static class ClientInfoLoggerConfigurationExtensions
12
12
{
13
13
/// <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.
16
15
/// </summary>
17
16
/// <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>
22
17
/// <exception cref="ArgumentNullException">enrichmentConfiguration</exception>
23
18
/// <returns>The logger configuration so that multiple calls can be chained.</returns>
24
19
public static LoggerConfiguration WithClientIp (
25
- this LoggerEnrichmentConfiguration enrichmentConfiguration ,
26
- string headerName = "x-forwarded-for" )
20
+ this LoggerEnrichmentConfiguration enrichmentConfiguration )
27
21
{
28
22
if ( enrichmentConfiguration == null )
29
23
{
@@ -85,4 +79,4 @@ public static LoggerConfiguration WithRequestHeader(this LoggerEnrichmentConfigu
85
79
86
80
return enrichmentConfiguration . With ( new ClientHeaderEnricher ( headerName , propertyName ) ) ;
87
81
}
88
- }
82
+ }
You can’t perform that action at this time.
0 commit comments