Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DebugProbe.AspNetCore/DebugProbe.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<PackageIcon>icon.png</PackageIcon>
<PackageId>DebugProbe.AspNetCore</PackageId>
<Version>1.3.0-preview.1</Version>
<Version>1.3.0-preview.2</Version>

<Authors>Georgi Hristov</Authors>
<Description>Debug and inspect HTTP requests and responses inside ASP.NET Core apps. Capture, analyze, and compare API calls with a built-in UI.</Description>
Expand Down
11 changes: 7 additions & 4 deletions DebugProbe.AspNetCore/Middleware/DebugProbeMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using DebugProbe.AspNetCore.Models;
using DebugProbe.AspNetCore.Storage;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Controllers;

namespace DebugProbe.AspNetCore.Middleware;

Expand All @@ -24,10 +25,12 @@ public DebugProbeMiddleware(RequestDelegate next)

public async Task Invoke(HttpContext context, DebugEntryStore store)
{
/// Skips DebugProbe endpoints to avoid self-tracking.
if (context.Request.Path.StartsWithSegments("/debug") ||
context.Request.Path.StartsWithSegments("/debugprobe") ||
context.Request.Path.StartsWithSegments("/favicon.ico"))
var endpoint = context.GetEndpoint();

var isApiEndpoint =
endpoint?.Metadata.GetMetadata<ControllerActionDescriptor>() is not null;

if (!isApiEndpoint)
{
await _next(context);
return;
Expand Down