Skip to content

Commit db725ff

Browse files
Merge pull request #104 from stainless-api/yolken-fix-hono-head2
fix: Add comment on routeMatcher fix
2 parents fd22090 + 79e87ad commit db725ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/hono/src/routeMatcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export function makeRouteMatcher(endpoints: AnyEndpoint[]) {
3535
const [method, path] = endpointToHono(endpoint.endpoint);
3636
routeMatcher.add(method, path, endpoint);
3737
if (method === "GET") {
38-
// Hono route matching is method-specific, so also add a
39-
// HEAD route for GET endpoints
38+
// Add HEAD route for every GET route so that HEAD requests
39+
// are also matched.
4040
routeMatcher.add("HEAD", path, endpoint);
4141
}
4242
}

0 commit comments

Comments
 (0)