netlify-cli 15.0.0-rc.0 → 15.0.0
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/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "15.0.0
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "15.0.0
|
|
9
|
+
"version": "15.0.0",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { env } from 'process'
|
|
2
2
|
|
|
3
|
-
const latestBootstrapURL = 'https://
|
|
3
|
+
const latestBootstrapURL = 'https://64523ab4e7865600087fc3df--edge.netlify.com/bootstrap/index-combined.ts'
|
|
4
4
|
|
|
5
5
|
export const getBootstrapURL = () => env.NETLIFY_EDGE_BOOTSTRAP || latestBootstrapURL
|
|
@@ -131,10 +131,11 @@ export const initializeProxy = async ({
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
const featureFlags = ['edge_functions_bootstrap_failure_mode']
|
|
134
|
+
const forwardedHost = `localhost:${passthroughPort}`
|
|
134
135
|
|
|
135
136
|
req[headersSymbol] = {
|
|
136
137
|
[headers.FeatureFlags]: getFeatureFlagsHeader(featureFlags),
|
|
137
|
-
[headers.ForwardedHost]:
|
|
138
|
+
[headers.ForwardedHost]: forwardedHost,
|
|
138
139
|
[headers.Functions]: functionNames.join(','),
|
|
139
140
|
[headers.InvocationMetadata]: getInvocationMetadataHeader(invocationMetadata),
|
|
140
141
|
[headers.IP]: LOCAL_HOST,
|
|
@@ -145,6 +146,13 @@ export const initializeProxy = async ({
|
|
|
145
146
|
req[headersSymbol][headers.DebugLogging] = '1'
|
|
146
147
|
}
|
|
147
148
|
|
|
149
|
+
// If we're using a different port for passthrough requests, which is the
|
|
150
|
+
// case when the CLI is running on HTTPS, use it on the Host header so
|
|
151
|
+
// that the request URL inside the edge function is something accessible.
|
|
152
|
+
if (mainPort !== passthroughPort) {
|
|
153
|
+
req[headersSymbol].host = forwardedHost
|
|
154
|
+
}
|
|
155
|
+
|
|
148
156
|
return `http://${LOCAL_HOST}:${isolatePort}`
|
|
149
157
|
}
|
|
150
158
|
}
|