@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.
Files changed (2) hide show
  1. package/http.js +4 -1
  2. 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
- res.setHeader('request-id', req.id)
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "23.7.3",
3
+ "version": "23.7.5",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",