@nxtedition/lib 23.7.3 → 23.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/http.js +4 -1
- package/package.json +1 -1
package/http.js
CHANGED
|
@@ -133,6 +133,7 @@ export class Context {
|
|
|
133
133
|
return this.#req.query
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
+
this.#target ??= requestTarget(this.#req)
|
|
136
137
|
this.#query ??=
|
|
137
138
|
this.#target.search.length > 1
|
|
138
139
|
? Object.freeze(querystring.parse(this.#target.search.slice(1)))
|
|
@@ -624,7 +625,9 @@ export async function request(ctx, next) {
|
|
|
624
625
|
req.resume() // Dump the body if there is one.
|
|
625
626
|
}
|
|
626
627
|
|
|
627
|
-
|
|
628
|
+
if (req.id) {
|
|
629
|
+
res.setHeader('request-id', req.id)
|
|
630
|
+
}
|
|
628
631
|
|
|
629
632
|
const isHealthcheck = ctx.url.pathname === '/healthcheck' || ctx.url.pathname === '/_up'
|
|
630
633
|
|