com.jimuwd.xian.registry-proxy 1.0.106 → 1.0.107

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -168,7 +168,7 @@ async function writeResponseToDownstreamClient(registryInfo, targetUrl, resToDow
168
168
  const data = await upstreamResponse.json();
169
169
  if (data.versions) { // 处理node依赖包元数据
170
170
  logger.info("Write package meta data application/json response from upstream to downstream", targetUrl);
171
- const host = reqFromDownstreamClient.headers.host || `localhost:${proxyPort}`;
171
+ const host = reqFromDownstreamClient.headers.host || `127.0.0.1:${proxyPort}`;
172
172
  const baseUrl = `${proxyInfo.https ? 'https' : 'http'}://${host}${proxyInfo.basePath === '/' ? '' : proxyInfo.basePath}`;
173
173
  for (const versionKey in data.versions) {
174
174
  const packageVersion = data.versions[versionKey];
@@ -402,7 +402,7 @@ export async function startProxyServer(proxyConfigPath, localYarnConfigPath, glo
402
402
  proxyPort = address.port;
403
403
  const portFile = join(process.env.PROJECT_ROOT || process.cwd(), '.registry-proxy-port');
404
404
  writeFile(portFile, proxyPort.toString()).catch(e => logger.error('Failed to write port file:', e));
405
- logger.info(`Proxy server running on ${proxyInfo.https ? 'https' : 'http'}://localhost:${proxyPort}${basePathPrefixedWithSlash === '/' ? '' : basePathPrefixedWithSlash}`);
405
+ logger.info(`Proxy server running on ${proxyInfo.https ? 'https' : 'http'}://127.0.0.1:${proxyPort}${basePathPrefixedWithSlash === '/' ? '' : basePathPrefixedWithSlash}`);
406
406
  resolve(server);
407
407
  });
408
408
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.jimuwd.xian.registry-proxy",
3
- "version": "1.0.106",
3
+ "version": "1.0.107",
4
4
  "description": "A lightweight npm registry proxy with fallback support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",