@cedarjs/cli 7.0.0-canary.3073 → 7.0.0-canary.3074

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.
@@ -126,9 +126,19 @@ const builder = async (yargs) => {
126
126
  const targetPath = url.pathname.slice(apiUrl.length) || "/";
127
127
  const root = apiRootPath === "/" ? "" : apiRootPath;
128
128
  const targetUrl = `${apiTarget}${root}${targetPath}${url.search}`;
129
+ const forwardedHeaders = new Headers(req.headers);
130
+ if (!forwardedHeaders.has("x-forwarded-host")) {
131
+ forwardedHeaders.set(
132
+ "x-forwarded-host",
133
+ req.headers.get("host") || url.host
134
+ );
135
+ }
136
+ if (!forwardedHeaders.has("x-forwarded-proto")) {
137
+ forwardedHeaders.set("x-forwarded-proto", "http");
138
+ }
129
139
  return fetch(targetUrl, {
130
140
  method: req.method,
131
- headers: req.headers,
141
+ headers: forwardedHeaders,
132
142
  body: req.body,
133
143
  // @ts-expect-error - `duplex` is required when forwarding a
134
144
  // request body via fetch (Node 18+).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "7.0.0-canary.3073",
3
+ "version": "7.0.0-canary.3074",
4
4
  "description": "The CedarJS Command Line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,17 +36,17 @@
36
36
  "@babel/preset-typescript": "7.29.7",
37
37
  "@babel/traverse": "7.29.8",
38
38
  "@babel/types": "7.29.8",
39
- "@cedarjs/api-server": "7.0.0-canary.3073",
40
- "@cedarjs/babel-config": "7.0.0-canary.3073",
41
- "@cedarjs/cli-helpers": "7.0.0-canary.3073",
42
- "@cedarjs/internal": "7.0.0-canary.3073",
43
- "@cedarjs/prerender": "7.0.0-canary.3073",
44
- "@cedarjs/project-config": "7.0.0-canary.3073",
45
- "@cedarjs/structure": "7.0.0-canary.3073",
46
- "@cedarjs/telemetry": "7.0.0-canary.3073",
47
- "@cedarjs/utils": "7.0.0-canary.3073",
48
- "@cedarjs/vite": "7.0.0-canary.3073",
49
- "@cedarjs/web-server": "7.0.0-canary.3073",
39
+ "@cedarjs/api-server": "7.0.0-canary.3074",
40
+ "@cedarjs/babel-config": "7.0.0-canary.3074",
41
+ "@cedarjs/cli-helpers": "7.0.0-canary.3074",
42
+ "@cedarjs/internal": "7.0.0-canary.3074",
43
+ "@cedarjs/prerender": "7.0.0-canary.3074",
44
+ "@cedarjs/project-config": "7.0.0-canary.3074",
45
+ "@cedarjs/structure": "7.0.0-canary.3074",
46
+ "@cedarjs/telemetry": "7.0.0-canary.3074",
47
+ "@cedarjs/utils": "7.0.0-canary.3074",
48
+ "@cedarjs/vite": "7.0.0-canary.3074",
49
+ "@cedarjs/web-server": "7.0.0-canary.3074",
50
50
  "@listr2/prompt-adapter-enquirer": "4.3.1",
51
51
  "@opentelemetry/api": "1.9.1",
52
52
  "@opentelemetry/core": "1.30.1",
@@ -94,7 +94,7 @@
94
94
  "yargs": "17.7.3"
95
95
  },
96
96
  "devDependencies": {
97
- "@cedarjs/framework-tools": "7.0.0-canary.3073",
97
+ "@cedarjs/framework-tools": "7.0.0-canary.3074",
98
98
  "@prisma/dmmf": "7.10.0",
99
99
  "@types/archiver": "^7.0.0",
100
100
  "memfs": "4.68.2",