Skip to content

Commit 08006de

Browse files
Merge pull request #196 from OpenReferralUK/fix--sanitize-URL-in-logging-for-successful-HTTP-responses
fix: sanitize URL in logging for successful HTTP responses
2 parents bcf002b + 56aa349 commit 08006de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

OpenReferralApi.Core/Services/OpenApiValidationService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,7 +1987,8 @@ private async Task<EndpointTestResult> TestSingleEndpointWithIdExtractionAsync(
19871987
var successfulResponse = result.TestResults.First(r => r.IsSuccessStatusCode);
19881988

19891989
_logger.LogInformation("Processing HTTP response from {Url} (Status: {StatusCode}, ResponseSize: {Size} chars)",
1990-
successfulResponse.RequestUrl, successfulResponse.ResponseStatusCode,
1990+
SchemaResolverService.SanitizeUrlForLogging(successfulResponse.RequestUrl ?? string.Empty),
1991+
successfulResponse.ResponseStatusCode,
19911992
successfulResponse.ResponseBody?.Length ?? 0);
19921993

19931994
// Log first 500 characters of response for debugging

0 commit comments

Comments
 (0)