alpic 1.131.0 → 1.132.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.
@@ -11151,9 +11151,9 @@ var require_src = __commonJS({
11151
11151
  }
11152
11152
  });
11153
11153
 
11154
- // ../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/debug.js
11154
+ // ../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/debug.js
11155
11155
  var require_debug = __commonJS({
11156
- "../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/debug.js"(exports, module) {
11156
+ "../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/debug.js"(exports, module) {
11157
11157
  var debug3;
11158
11158
  module.exports = function() {
11159
11159
  if (!debug3) {
@@ -11171,9 +11171,9 @@ var require_debug = __commonJS({
11171
11171
  }
11172
11172
  });
11173
11173
 
11174
- // ../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/index.js
11174
+ // ../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/index.js
11175
11175
  var require_follow_redirects = __commonJS({
11176
- "../../node_modules/.pnpm/follow-redirects@1.15.11_debug@4.4.3/node_modules/follow-redirects/index.js"(exports, module) {
11176
+ "../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/index.js"(exports, module) {
11177
11177
  var url2 = __require("url");
11178
11178
  var URL2 = url2.URL;
11179
11179
  var http3 = __require("http");
@@ -11195,6 +11195,11 @@ var require_follow_redirects = __commonJS({
11195
11195
  } catch (error) {
11196
11196
  useNativeURL = error.code === "ERR_INVALID_URL";
11197
11197
  }
11198
+ var sensitiveHeaders = [
11199
+ "Authorization",
11200
+ "Proxy-Authorization",
11201
+ "Cookie"
11202
+ ];
11198
11203
  var preservedUrlFields = [
11199
11204
  "auth",
11200
11205
  "host",
@@ -11259,6 +11264,7 @@ var require_follow_redirects = __commonJS({
11259
11264
  self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
11260
11265
  }
11261
11266
  };
11267
+ this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + ")$", "i");
11262
11268
  this._performRequest();
11263
11269
  }
11264
11270
  RedirectableRequest.prototype = Object.create(Writable.prototype);
@@ -11396,6 +11402,9 @@ var require_follow_redirects = __commonJS({
11396
11402
  if (!options.headers) {
11397
11403
  options.headers = {};
11398
11404
  }
11405
+ if (!isArray2(options.sensitiveHeaders)) {
11406
+ options.sensitiveHeaders = [];
11407
+ }
11399
11408
  if (options.host) {
11400
11409
  if (!options.hostname) {
11401
11410
  options.hostname = options.host;
@@ -11501,7 +11510,7 @@ var require_follow_redirects = __commonJS({
11501
11510
  this._isRedirect = true;
11502
11511
  spreadUrlObject(redirectUrl, this._options);
11503
11512
  if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
11504
- removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
11513
+ removeMatchingHeaders(this._headerFilter, this._options.headers);
11505
11514
  }
11506
11515
  if (isFunction3(beforeRedirect)) {
11507
11516
  var responseDetails = {
@@ -11650,6 +11659,9 @@ var require_follow_redirects = __commonJS({
11650
11659
  var dot = subdomain.length - domain.length - 1;
11651
11660
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
11652
11661
  }
11662
+ function isArray2(value) {
11663
+ return value instanceof Array;
11664
+ }
11653
11665
  function isString2(value) {
11654
11666
  return typeof value === "string" || value instanceof String;
11655
11667
  }
@@ -11662,6 +11674,9 @@ var require_follow_redirects = __commonJS({
11662
11674
  function isURL(value) {
11663
11675
  return URL2 && value instanceof URL2;
11664
11676
  }
11677
+ function escapeRegex(regex) {
11678
+ return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
11679
+ }
11665
11680
  module.exports = wrap({ http: http3, https: https2 });
11666
11681
  module.exports.wrap = wrap;
11667
11682
  }