Skip to content

Commit

Permalink
fix multiple sanitizers registering to a single recording
Browse files Browse the repository at this point in the history
  • Loading branch information
scbedd committed May 8, 2024
1 parent 31b4772 commit 980d20a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/test-proxy/Azure.Sdk.Tools.TestProxy/Admin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,19 @@ public async Task AddSanitizers()
{
var registeredId = _recordingHandler.RegisterSanitizer(sanitizer, recordingId);
registeredSanitizers.Add(registeredId);
Response.Headers.Add("x-recording-id", recordingId);
}
else
{
var registeredId = _recordingHandler.RegisterSanitizer(sanitizer);
registeredSanitizers.Add(registeredId);
}
}

if (recordingId != null)
{
Response.Headers.Add("x-recording-id", recordingId);
}

var json = JsonSerializer.Serialize(new { Sanitizers = registeredSanitizers });
Response.ContentType = "application/json";
Response.ContentLength = json.Length;
Expand Down

0 comments on commit 980d20a

Please sign in to comment.