Remove trap paths and known hosts: catch everything on the trap port

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
TomandClaude Opus 5.5 committed 2026-11-15 18:56:35 +01:00
1 parent b9f2b0443c
commit 9a56fc5b48
31 files changed
+335 -462

No files matched your search

@@ -3,7 +3,6 @@ using Flypaper.Core.Abstractions;
using Flypaper.Core.Models;
using Flypaper.Core.Networking;
using Flypaper.Core.Runtime;
using Flypaper.Http.Matching;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core.Features;
@@ -13,7 +12,6 @@ namespace Flypaper.Http.Middleware;
internal sealed class FlypaperMiddleware(
RequestDelegate next,
TrapMatcher matcher,
TrapRunner runner,
IOptions<PortOptions> ports,
TimeProvider timeProvider)
@@ -27,11 +25,6 @@ internal sealed class FlypaperMiddleware(
}
var request = context.Request;
if (matcher.Match(request.Host.Host, request.Path.Value) == TrapMatch.None)
{
context.Response.StatusCode = StatusCodes.Status404NotFound;
return;
}
var session = new TrapSession(
Guid.NewGuid(),