Skip to content

Commit 2c98910

Browse files
authored
Merge branch 'main' into allowed-models-metadata
2 parents 168d925 + e4eb034 commit 2c98910

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/handlers/handlerUtils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,7 @@ export async function tryTargetsRecursively(
734734
conditionalRouter = new ConditionalRouter(currentTarget, {
735735
metadata,
736736
params,
737+
url: { pathname: c.req.path },
737738
});
738739
finalTarget = conditionalRouter.resolveTarget();
739740
} catch (conditionalRouter: any) {

src/services/conditionalRouter.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ type Query = {
77
interface RouterContext {
88
metadata?: Record<string, string>;
99
params?: Record<string, any>;
10+
url?: {
11+
pathname: string;
12+
};
1013
}
1114

1215
enum Operator {

0 commit comments

Comments
 (0)