fix: write matched pattern into ctx.route (#3113)

Fixes https://github.com/denoland/fresh/issues/3112
This commit is contained in:
Marvin Hagemeister
2025-07-18 22:38:56 +02:00
committed by GitHub
parent 83da608504
commit 39737b4530
5 changed files with 41 additions and 0 deletions
+2
View File
@@ -76,6 +76,7 @@ export function serveMiddleware<T>(
config?: ResolvedFreshConfig;
buildCache?: BuildCache;
next?: () => Promise<Response>;
route?: string | null;
} = {},
): FakeServer {
return new FakeServer(async (req) => {
@@ -89,6 +90,7 @@ export function serveMiddleware<T>(
req,
new URL(req.url),
DEFAULT_CONN_INFO,
options.route ?? null,
{},
config,
() => Promise.resolve(next()),