Skip to content

Commit 3c4a952

Browse files
committed
downgrade to net8
1 parent b28c88d commit 3c4a952

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

Firetail.Net.Tests/Firetail.Net.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RootNamespace>Firetail.Tests</RootNamespace>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>

Firetail.Net.Tests/FiretailSample2Tests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public FiretailSample2Tests()
2424
_openApiDoc = new OpenApiSpecLoader().Load(filePath).Item1;
2525
_options = new FiretailOptions
2626
{
27-
BasePath = _openApiDoc.GetBasePath()
27+
BasePath = _openApiDoc.GetBasePath(),
28+
SensitiveHeaders = new string[] {"authorization"}
2829
};
2930
var httpClientFactory = new Mock<IHttpClientFactory>().Object;
3031
var logger = new Mock<ILogger<FiretailLoggingService>>().Object;

Firetail.Net/Firetail.Net.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RootNamespace>Firetail</RootNamespace>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>

Firetail.Net/FiretailMiddleware.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private static bool ValidateRequest(HttpContext httpContext, FiretailContext fir
113113
{
114114
errorResponse = CreateError(requestErrors.First().Status,
115115
"firetail.request.validation.failed", "Failed to validate request",
116-
requestErrors);
116+
requestErrors.ToArray());
117117
return false;
118118
}
119119
return true;
@@ -161,7 +161,7 @@ private async Task CaptureAndValidateResponseAsync(HttpContext httpContext, Fire
161161
private static bool IsUnsupportedContentType(string? contentType) =>
162162
!string.IsNullOrEmpty(contentType) && contentType != "application/json";
163163

164-
private static LogEntry CreateError(int statusCode, string type, string title, params List<ErrorDetails> details)
164+
private static LogEntry CreateError(int statusCode, string type, string title, params ErrorDetails[] details)
165165
{
166166
return new LogEntry
167167
{
@@ -172,6 +172,7 @@ private static LogEntry CreateError(int statusCode, string type, string title, p
172172
};
173173
}
174174

175+
175176
private void FinalizeLogAsync(FiretailContext firetailContext, HttpContext httpContext)
176177
{
177178
firetailContext.LatencyTimer.Stop();

0 commit comments

Comments
 (0)