We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fd22090 + 79e87ad commit db725ffCopy full SHA for db725ff
packages/hono/src/routeMatcher.ts
@@ -35,8 +35,8 @@ export function makeRouteMatcher(endpoints: AnyEndpoint[]) {
35
const [method, path] = endpointToHono(endpoint.endpoint);
36
routeMatcher.add(method, path, endpoint);
37
if (method === "GET") {
38
- // Hono route matching is method-specific, so also add a
39
- // HEAD route for GET endpoints
+ // Add HEAD route for every GET route so that HEAD requests
+ // are also matched.
40
routeMatcher.add("HEAD", path, endpoint);
41
}
42
0 commit comments