@merkaly/nuxt 0.7.2 → 0.7.3

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/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.14.0"
6
6
  },
7
- "version": "0.7.2",
7
+ "version": "0.7.3",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -1,6 +1,7 @@
1
1
  import { defineEventHandler, getRequestURL, proxyRequest } from "h3";
2
2
  import { useRuntimeConfig } from "#imports";
3
3
  const GLOBAL_API_HEADER = "x-merkaly-global";
4
+ const TENANT_HOST_HEADER = "x-merkaly-host";
4
5
  const API_PREFIX_PATTERN = /^\/api\/?/;
5
6
  const API_ROUTE_PATTERN = /^\/api(?:\/|$)/;
6
7
  const EDGE_SLASH_PATTERN = /^\/|\/$/g;
@@ -27,6 +28,7 @@ export default defineEventHandler((event) => {
27
28
  const prefix = isGlobalRequest(event.node.req.headers[GLOBAL_API_HEADER]) ? "" : $config.merkaly.api.prefix;
28
29
  const path = resolveProxyPath(prefix, url.pathname, url.search);
29
30
  event.node.req.headers["x-forwarded-host"] = url.host;
31
+ event.node.req.headers[TENANT_HOST_HEADER] = url.host;
30
32
  if (import.meta.dev && targetOrigin.hostname.endsWith(".test")) {
31
33
  process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
32
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/nuxt",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/merkaly-io/nuxt.git"