@nasl/cli 0.1.7 → 0.1.8

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/index.mjs CHANGED
@@ -10,7 +10,7 @@ import require$$0$5 from 'constants';
10
10
  import require$$5 from 'assert';
11
11
  import require$$3 from 'http';
12
12
  import require$$4 from 'https';
13
- import require$$0$6, { URL as URL$1 } from 'url';
13
+ import require$$0$6 from 'url';
14
14
  import require$$8 from 'crypto';
15
15
  import http2 from 'http2';
16
16
  import zlib from 'zlib';
@@ -32378,7 +32378,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
32378
32378
  } else {
32379
32379
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
32380
32380
  options.port = parsed.port;
32381
- setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
32381
+ setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : parsed.protocol === 'https:' ? '443' : '') + options.path);
32382
32382
  }
32383
32383
 
32384
32384
  let transport;
@@ -34312,22 +34312,10 @@ const {
34312
34312
  } = axios;
34313
34313
 
34314
34314
  function createAxios(baseURL) {
34315
- // 解析 baseURL 提取 hostname 和 port
34316
- const url = new URL$1(baseURL);
34317
- const hostname = url.hostname;
34318
- const protocol = url.protocol;
34319
- // 确定端口:如果 URL 中没有指定端口,根据协议使用默认端口
34320
- let port = url.port;
34321
- if (!port) {
34322
- port = protocol === 'https:' ? '443' : '80';
34323
- }
34324
- // 构建 Host 头:hostname:port
34325
- const hostHeader = `${hostname}:${port}`;
34326
34315
  return axios.create({
34327
34316
  baseURL,
34328
34317
  headers: {
34329
34318
  'Content-Type': 'application/json',
34330
- 'Host': hostHeader,
34331
34319
  },
34332
34320
  timeout: 120000,
34333
34321
  });