netlify-cli 10.11.0 → 10.11.1
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 +2 -2
- package/package.json +1 -1
- package/src/utils/proxy.js +5 -5
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "10.11.
|
|
3
|
+
"version": "10.11.1",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "10.11.
|
|
9
|
+
"version": "10.11.1",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
package/package.json
CHANGED
package/src/utils/proxy.js
CHANGED
|
@@ -279,7 +279,7 @@ const initializeProxy = async function ({ configPath, distDir, port, projectDir
|
|
|
279
279
|
const proxy = httpProxy.createProxyServer({
|
|
280
280
|
selfHandleResponse: true,
|
|
281
281
|
target: {
|
|
282
|
-
host: '
|
|
282
|
+
host: '127.0.0.1',
|
|
283
283
|
port,
|
|
284
284
|
},
|
|
285
285
|
})
|
|
@@ -349,7 +349,7 @@ const initializeProxy = async function ({ configPath, distDir, port, projectDir
|
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
const responseData = []
|
|
352
|
-
const requestURL = new URL(req.url, `http://${req.headers.host || '
|
|
352
|
+
const requestURL = new URL(req.url, `http://${req.headers.host || '127.0.0.1'}`)
|
|
353
353
|
const headersRules = headersForPath(headers, requestURL.pathname)
|
|
354
354
|
|
|
355
355
|
proxyRes.on('data', function onData(data) {
|
|
@@ -392,7 +392,7 @@ const initializeProxy = async function ({ configPath, distDir, port, projectDir
|
|
|
392
392
|
|
|
393
393
|
const handlers = {
|
|
394
394
|
web: (req, res, options) => {
|
|
395
|
-
const requestURL = new URL(req.url, 'http://
|
|
395
|
+
const requestURL = new URL(req.url, 'http://127.0.0.1')
|
|
396
396
|
req.proxyOptions = options
|
|
397
397
|
req.alternativePaths = alternativePathsFor(requestURL.pathname).map((filePath) => filePath + requestURL.search)
|
|
398
398
|
// Ref: https://nodejs.org/api/net.html#net_socket_remoteaddress
|
|
@@ -428,7 +428,7 @@ const onRequest = async ({ addonsUrls, edgeFunctionsProxy, functionsServer, prox
|
|
|
428
428
|
const options = {
|
|
429
429
|
match,
|
|
430
430
|
addonsUrls,
|
|
431
|
-
target: `http://
|
|
431
|
+
target: `http://127.0.0.1:${settings.frameworkPort}`,
|
|
432
432
|
publicFolder: settings.dist,
|
|
433
433
|
functionsServer,
|
|
434
434
|
functionsPort: settings.functionsPort,
|
|
@@ -474,7 +474,7 @@ const startProxy = async function ({
|
|
|
474
474
|
settings,
|
|
475
475
|
state,
|
|
476
476
|
}) {
|
|
477
|
-
const functionsServer = settings.functionsPort ? `http://
|
|
477
|
+
const functionsServer = settings.functionsPort ? `http://127.0.0.1:${settings.functionsPort}` : null
|
|
478
478
|
const edgeFunctionsProxy = await edgeFunctions.initializeProxy({
|
|
479
479
|
config,
|
|
480
480
|
configPath,
|