Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit a6ea195

Browse files
committed
fix: add url and qi to context
1 parent 6d0facb commit a6ea195

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,19 @@ export const node =
8282
headers: {}
8383
}
8484

85+
const url = request.url
86+
const s = url.indexOf('/', 11)
87+
const qi = url.indexOf('?', s + 1)
88+
8589
const context = {
8690
...app.decorators,
8791
set,
8892
params,
8993
store: app.store,
9094
request,
91-
query
95+
query,
96+
url,
97+
qi
9298
} as Context
9399

94100
for (let i = 0; i < app.event.request.length; i++) {

0 commit comments

Comments
 (0)