c8y-nitro 0.10.1 → 0.10.2

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.
@@ -1,4 +1,4 @@
1
- import { n as name, r as version, t as description } from "../package-Bt8__Vz0.mjs";
1
+ import { n as name, r as version, t as description } from "../package-CNi0saSw.mjs";
2
2
  import { defineCommand, runMain } from "citty";
3
3
  //#region src/cli/index.ts
4
4
  const main = defineCommand({
@@ -265,6 +265,7 @@ function useUserClient(requestOrEvent) {
265
265
  const headers = convertRequestHeadersToC8yFormat(request);
266
266
  const auth = new MicroserviceClientRequestAuth(headers);
267
267
  const client = new Client(auth, process.env.C8Y_BASEURL);
268
+ client.core.defaultHeaders["X-Forwarded-Host"] = request.headers.get("x-forwarded-host") ?? process.env.C8Y_BASEURL;
268
269
  request.context ??= {};
269
270
  request.context["c8y_user_client"] = client;
270
271
  return client;
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as GENERATED_INVALIDATE_TENANT_OPTIONS_ROUTE, i as C8Y_NITRO_TYPES_FILE, n as createC8yManifestFromNitro, o as GENERATED_LIVENESS_ROUTE, r as C8Y_NITRO_TYPES_DIR, s as GENERATED_READINESS_ROUTE, t as createC8yManifest } from "./manifest-DV3UW9Dl.mjs";
2
2
  import { t as writeAPIClient } from "./apiClient-kxv5KHYJ.mjs";
3
3
  import { t as autoBootstrap } from "./autoBootstrap-DUjHuHe_.mjs";
4
- import { n as name } from "./package-Bt8__Vz0.mjs";
4
+ import { n as name } from "./package-CNi0saSw.mjs";
5
5
  import { basename, join, resolve } from "node:path";
6
6
  import { copyFile, mkdir, writeFile } from "node:fs/promises";
7
7
  import { x } from "tinyexec";
@@ -1,6 +1,6 @@
1
1
  //#region package.json
2
2
  var name = "c8y-nitro";
3
- var version = "0.10.1";
3
+ var version = "0.10.2";
4
4
  var description = "Lightning fast Cumulocity IoT microservice development powered by Nitro";
5
5
  //#endregion
6
6
  export { name as n, version as r, description as t };
@@ -1,5 +1,5 @@
1
1
  import { t as createError } from "../../logging-BUYT8Z2V.mjs";
2
- import { t as useDeployedTenantClient } from "../../client-BjA5bBxj.mjs";
2
+ import { t as useDeployedTenantClient } from "../../client-CT8zR8b-.mjs";
3
3
  import { c8yTenantOptionKeys } from "c8y-nitro/runtime";
4
4
  import { defineCachedFunction } from "nitro/cache";
5
5
  import { useRuntimeConfig } from "nitro/runtime-config";
@@ -1,4 +1,4 @@
1
- import { r as tryGetUserTenantDomainFast } from "../../client-BjA5bBxj.mjs";
1
+ import { r as tryGetUserTenantDomainFast } from "../../client-CT8zR8b-.mjs";
2
2
  import { c8yManifest } from "c8y-nitro/runtime";
3
3
  import { useRuntimeConfig } from "nitro/runtime-config";
4
4
  import { getRequestURL } from "nitro/h3";
@@ -1,4 +1,4 @@
1
- import { n as buildPublicRequestUrl, r as tryGetUserTenantDomainFast } from "../../client-BjA5bBxj.mjs";
1
+ import { n as buildPublicRequestUrl, r as tryGetUserTenantDomainFast } from "../../client-CT8zR8b-.mjs";
2
2
  import { c8yManifest } from "c8y-nitro/runtime";
3
3
  import { defineMiddleware } from "nitro";
4
4
  //#region src/module/runtime/handlers/rewriteRequestUrl.ts
package/dist/utils.mjs CHANGED
@@ -328,6 +328,7 @@ function useUserClient(requestOrEvent) {
328
328
  const headers = convertRequestHeadersToC8yFormat(request);
329
329
  const auth = new MicroserviceClientRequestAuth(headers);
330
330
  const client = new Client(auth, process.env.C8Y_BASEURL);
331
+ client.core.defaultHeaders["X-Forwarded-Host"] = request.headers.get("x-forwarded-host") ?? process.env.C8Y_BASEURL;
331
332
  request.context ??= {};
332
333
  request.context["c8y_user_client"] = client;
333
334
  return client;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c8y-nitro",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
4
4
  "type": "module",
5
5
  "description": "Lightning fast Cumulocity IoT microservice development powered by Nitro",
6
6
  "keywords": [