Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

Commit 8ce6c6e

Browse files
AmirSassonmivano
authored andcommitted
support config global headers that contains equal sign ('=') in its value (#97)
1 parent 415cadc commit 8ce6c6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Serilog.Sinks.Elasticsearch/LoggerConfigurationElasticSearchExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public static LoggerConfiguration Elasticsearch(
142142
.ToList()
143143
.ForEach(headerValueStr =>
144144
{
145-
var headerValue = headerValueStr.Split(new[] { '=' }, StringSplitOptions.RemoveEmptyEntries);
145+
var headerValue = headerValueStr.Split(new[] { '=' }, 2, StringSplitOptions.RemoveEmptyEntries);
146146
headers.Add(headerValue[0], headerValue[1]);
147147
});
148148

0 commit comments

Comments
 (0)