axios 0.19.0 → 0.19.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.

Potentially problematic release.


This version of axios might be problematic. Click here for more details.

package/dist/axios.js CHANGED
@@ -1,4 +1,4 @@
1
- /* axios v0.19.0 | (c) 2019 by Matt Zabriskie */
1
+ /* axios v0.19.1 | (c) 2020 by Matt Zabriskie */
2
2
  (function webpackUniversalModuleDefinition(root, factory) {
3
3
  if(typeof exports === 'object' && typeof module === 'object')
4
4
  module.exports = factory();
@@ -65,9 +65,9 @@ return /******/ (function(modules) { // webpackBootstrap
65
65
 
66
66
  var utils = __webpack_require__(2);
67
67
  var bind = __webpack_require__(3);
68
- var Axios = __webpack_require__(5);
69
- var mergeConfig = __webpack_require__(22);
70
- var defaults = __webpack_require__(11);
68
+ var Axios = __webpack_require__(4);
69
+ var mergeConfig = __webpack_require__(23);
70
+ var defaults = __webpack_require__(10);
71
71
 
72
72
  /**
73
73
  * Create an instance of Axios
@@ -100,15 +100,15 @@ return /******/ (function(modules) { // webpackBootstrap
100
100
  };
101
101
 
102
102
  // Expose Cancel & CancelToken
103
- axios.Cancel = __webpack_require__(23);
104
- axios.CancelToken = __webpack_require__(24);
105
- axios.isCancel = __webpack_require__(10);
103
+ axios.Cancel = __webpack_require__(24);
104
+ axios.CancelToken = __webpack_require__(25);
105
+ axios.isCancel = __webpack_require__(9);
106
106
 
107
107
  // Expose all/spread
108
108
  axios.all = function all(promises) {
109
109
  return Promise.all(promises);
110
110
  };
111
- axios.spread = __webpack_require__(25);
111
+ axios.spread = __webpack_require__(26);
112
112
 
113
113
  module.exports = axios;
114
114
 
@@ -123,7 +123,6 @@ return /******/ (function(modules) { // webpackBootstrap
123
123
  'use strict';
124
124
 
125
125
  var bind = __webpack_require__(3);
126
- var isBuffer = __webpack_require__(4);
127
126
 
128
127
  /*global toString:true*/
129
128
 
@@ -141,6 +140,27 @@ return /******/ (function(modules) { // webpackBootstrap
141
140
  return toString.call(val) === '[object Array]';
142
141
  }
143
142
 
143
+ /**
144
+ * Determine if a value is undefined
145
+ *
146
+ * @param {Object} val The value to test
147
+ * @returns {boolean} True if the value is undefined, otherwise false
148
+ */
149
+ function isUndefined(val) {
150
+ return typeof val === 'undefined';
151
+ }
152
+
153
+ /**
154
+ * Determine if a value is a Buffer
155
+ *
156
+ * @param {Object} val The value to test
157
+ * @returns {boolean} True if value is a Buffer, otherwise false
158
+ */
159
+ function isBuffer(val) {
160
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
161
+ && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
162
+ }
163
+
144
164
  /**
145
165
  * Determine if a value is an ArrayBuffer
146
166
  *
@@ -197,16 +217,6 @@ return /******/ (function(modules) { // webpackBootstrap
197
217
  return typeof val === 'number';
198
218
  }
199
219
 
200
- /**
201
- * Determine if a value is undefined
202
- *
203
- * @param {Object} val The value to test
204
- * @returns {boolean} True if the value is undefined, otherwise false
205
- */
206
- function isUndefined(val) {
207
- return typeof val === 'undefined';
208
- }
209
-
210
220
  /**
211
221
  * Determine if a value is an Object
212
222
  *
@@ -475,32 +485,15 @@ return /******/ (function(modules) { // webpackBootstrap
475
485
 
476
486
  /***/ }),
477
487
  /* 4 */
478
- /***/ (function(module, exports) {
479
-
480
- /*!
481
- * Determine if an object is a Buffer
482
- *
483
- * @author Feross Aboukhadijeh <https://feross.org>
484
- * @license MIT
485
- */
486
-
487
- module.exports = function isBuffer (obj) {
488
- return obj != null && obj.constructor != null &&
489
- typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
490
- }
491
-
492
-
493
- /***/ }),
494
- /* 5 */
495
488
  /***/ (function(module, exports, __webpack_require__) {
496
489
 
497
490
  'use strict';
498
491
 
499
492
  var utils = __webpack_require__(2);
500
- var buildURL = __webpack_require__(6);
501
- var InterceptorManager = __webpack_require__(7);
502
- var dispatchRequest = __webpack_require__(8);
503
- var mergeConfig = __webpack_require__(22);
493
+ var buildURL = __webpack_require__(5);
494
+ var InterceptorManager = __webpack_require__(6);
495
+ var dispatchRequest = __webpack_require__(7);
496
+ var mergeConfig = __webpack_require__(23);
504
497
 
505
498
  /**
506
499
  * Create a new instance of Axios
@@ -531,7 +524,15 @@ return /******/ (function(modules) { // webpackBootstrap
531
524
  }
532
525
 
533
526
  config = mergeConfig(this.defaults, config);
534
- config.method = config.method ? config.method.toLowerCase() : 'get';
527
+
528
+ // Set config.method
529
+ if (config.method) {
530
+ config.method = config.method.toLowerCase();
531
+ } else if (this.defaults.method) {
532
+ config.method = this.defaults.method.toLowerCase();
533
+ } else {
534
+ config.method = 'get';
535
+ }
535
536
 
536
537
  // Hook up interceptors middleware
537
538
  var chain = [dispatchRequest, undefined];
@@ -583,7 +584,7 @@ return /******/ (function(modules) { // webpackBootstrap
583
584
 
584
585
 
585
586
  /***/ }),
586
- /* 6 */
587
+ /* 5 */
587
588
  /***/ (function(module, exports, __webpack_require__) {
588
589
 
589
590
  'use strict';
@@ -660,7 +661,7 @@ return /******/ (function(modules) { // webpackBootstrap
660
661
 
661
662
 
662
663
  /***/ }),
663
- /* 7 */
664
+ /* 6 */
664
665
  /***/ (function(module, exports, __webpack_require__) {
665
666
 
666
667
  'use strict';
@@ -718,17 +719,15 @@ return /******/ (function(modules) { // webpackBootstrap
718
719
 
719
720
 
720
721
  /***/ }),
721
- /* 8 */
722
+ /* 7 */
722
723
  /***/ (function(module, exports, __webpack_require__) {
723
724
 
724
725
  'use strict';
725
726
 
726
727
  var utils = __webpack_require__(2);
727
- var transformData = __webpack_require__(9);
728
- var isCancel = __webpack_require__(10);
729
- var defaults = __webpack_require__(11);
730
- var isAbsoluteURL = __webpack_require__(20);
731
- var combineURLs = __webpack_require__(21);
728
+ var transformData = __webpack_require__(8);
729
+ var isCancel = __webpack_require__(9);
730
+ var defaults = __webpack_require__(10);
732
731
 
733
732
  /**
734
733
  * Throws a `Cancel` if cancellation has been requested.
@@ -748,11 +747,6 @@ return /******/ (function(modules) { // webpackBootstrap
748
747
  module.exports = function dispatchRequest(config) {
749
748
  throwIfCancellationRequested(config);
750
749
 
751
- // Support baseURL config
752
- if (config.baseURL && !isAbsoluteURL(config.url)) {
753
- config.url = combineURLs(config.baseURL, config.url);
754
- }
755
-
756
750
  // Ensure headers exist
757
751
  config.headers = config.headers || {};
758
752
 
@@ -767,7 +761,7 @@ return /******/ (function(modules) { // webpackBootstrap
767
761
  config.headers = utils.merge(
768
762
  config.headers.common || {},
769
763
  config.headers[config.method] || {},
770
- config.headers || {}
764
+ config.headers
771
765
  );
772
766
 
773
767
  utils.forEach(
@@ -810,7 +804,7 @@ return /******/ (function(modules) { // webpackBootstrap
810
804
 
811
805
 
812
806
  /***/ }),
813
- /* 9 */
807
+ /* 8 */
814
808
  /***/ (function(module, exports, __webpack_require__) {
815
809
 
816
810
  'use strict';
@@ -836,7 +830,7 @@ return /******/ (function(modules) { // webpackBootstrap
836
830
 
837
831
 
838
832
  /***/ }),
839
- /* 10 */
833
+ /* 9 */
840
834
  /***/ (function(module, exports) {
841
835
 
842
836
  'use strict';
@@ -847,13 +841,13 @@ return /******/ (function(modules) { // webpackBootstrap
847
841
 
848
842
 
849
843
  /***/ }),
850
- /* 11 */
844
+ /* 10 */
851
845
  /***/ (function(module, exports, __webpack_require__) {
852
846
 
853
847
  'use strict';
854
848
 
855
849
  var utils = __webpack_require__(2);
856
- var normalizeHeaderName = __webpack_require__(12);
850
+ var normalizeHeaderName = __webpack_require__(11);
857
851
 
858
852
  var DEFAULT_CONTENT_TYPE = {
859
853
  'Content-Type': 'application/x-www-form-urlencoded'
@@ -867,13 +861,12 @@ return /******/ (function(modules) { // webpackBootstrap
867
861
 
868
862
  function getDefaultAdapter() {
869
863
  var adapter;
870
- // Only Node.JS has a process variable that is of [[Class]] process
871
- if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
872
- // For node use HTTP adapter
873
- adapter = __webpack_require__(13);
874
- } else if (typeof XMLHttpRequest !== 'undefined') {
864
+ if (typeof XMLHttpRequest !== 'undefined') {
875
865
  // For browsers use XHR adapter
876
- adapter = __webpack_require__(13);
866
+ adapter = __webpack_require__(12);
867
+ } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
868
+ // For node use HTTP adapter
869
+ adapter = __webpack_require__(12);
877
870
  }
878
871
  return adapter;
879
872
  }
@@ -951,7 +944,7 @@ return /******/ (function(modules) { // webpackBootstrap
951
944
 
952
945
 
953
946
  /***/ }),
954
- /* 12 */
947
+ /* 11 */
955
948
  /***/ (function(module, exports, __webpack_require__) {
956
949
 
957
950
  'use strict';
@@ -969,17 +962,18 @@ return /******/ (function(modules) { // webpackBootstrap
969
962
 
970
963
 
971
964
  /***/ }),
972
- /* 13 */
965
+ /* 12 */
973
966
  /***/ (function(module, exports, __webpack_require__) {
974
967
 
975
968
  'use strict';
976
969
 
977
970
  var utils = __webpack_require__(2);
978
- var settle = __webpack_require__(14);
979
- var buildURL = __webpack_require__(6);
980
- var parseHeaders = __webpack_require__(17);
981
- var isURLSameOrigin = __webpack_require__(18);
982
- var createError = __webpack_require__(15);
971
+ var settle = __webpack_require__(13);
972
+ var buildURL = __webpack_require__(5);
973
+ var buildFullPath = __webpack_require__(16);
974
+ var parseHeaders = __webpack_require__(19);
975
+ var isURLSameOrigin = __webpack_require__(20);
976
+ var createError = __webpack_require__(14);
983
977
 
984
978
  module.exports = function xhrAdapter(config) {
985
979
  return new Promise(function dispatchXhrRequest(resolve, reject) {
@@ -999,7 +993,8 @@ return /******/ (function(modules) { // webpackBootstrap
999
993
  requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
1000
994
  }
1001
995
 
1002
- request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
996
+ var fullPath = buildFullPath(config.baseURL, config.url);
997
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
1003
998
 
1004
999
  // Set the request timeout in MS
1005
1000
  request.timeout = config.timeout;
@@ -1060,7 +1055,11 @@ return /******/ (function(modules) { // webpackBootstrap
1060
1055
 
1061
1056
  // Handle timeout
1062
1057
  request.ontimeout = function handleTimeout() {
1063
- reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',
1058
+ var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
1059
+ if (config.timeoutErrorMessage) {
1060
+ timeoutErrorMessage = config.timeoutErrorMessage;
1061
+ }
1062
+ reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
1064
1063
  request));
1065
1064
 
1066
1065
  // Clean up request
@@ -1071,10 +1070,10 @@ return /******/ (function(modules) { // webpackBootstrap
1071
1070
  // This is only done if running in a standard browser environment.
1072
1071
  // Specifically not if we're in a web worker, or react-native.
1073
1072
  if (utils.isStandardBrowserEnv()) {
1074
- var cookies = __webpack_require__(19);
1073
+ var cookies = __webpack_require__(22);
1075
1074
 
1076
1075
  // Add xsrf header
1077
- var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?
1076
+ var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
1078
1077
  cookies.read(config.xsrfCookieName) :
1079
1078
  undefined;
1080
1079
 
@@ -1097,8 +1096,8 @@ return /******/ (function(modules) { // webpackBootstrap
1097
1096
  }
1098
1097
 
1099
1098
  // Add withCredentials to request if needed
1100
- if (config.withCredentials) {
1101
- request.withCredentials = true;
1099
+ if (!utils.isUndefined(config.withCredentials)) {
1100
+ request.withCredentials = !!config.withCredentials;
1102
1101
  }
1103
1102
 
1104
1103
  // Add responseType to request if needed
@@ -1149,12 +1148,12 @@ return /******/ (function(modules) { // webpackBootstrap
1149
1148
 
1150
1149
 
1151
1150
  /***/ }),
1152
- /* 14 */
1151
+ /* 13 */
1153
1152
  /***/ (function(module, exports, __webpack_require__) {
1154
1153
 
1155
1154
  'use strict';
1156
1155
 
1157
- var createError = __webpack_require__(15);
1156
+ var createError = __webpack_require__(14);
1158
1157
 
1159
1158
  /**
1160
1159
  * Resolve or reject a Promise based on response status.
@@ -1180,12 +1179,12 @@ return /******/ (function(modules) { // webpackBootstrap
1180
1179
 
1181
1180
 
1182
1181
  /***/ }),
1183
- /* 15 */
1182
+ /* 14 */
1184
1183
  /***/ (function(module, exports, __webpack_require__) {
1185
1184
 
1186
1185
  'use strict';
1187
1186
 
1188
- var enhanceError = __webpack_require__(16);
1187
+ var enhanceError = __webpack_require__(15);
1189
1188
 
1190
1189
  /**
1191
1190
  * Create an Error with the specified message, config, error code, request and response.
@@ -1204,7 +1203,7 @@ return /******/ (function(modules) { // webpackBootstrap
1204
1203
 
1205
1204
 
1206
1205
  /***/ }),
1207
- /* 16 */
1206
+ /* 15 */
1208
1207
  /***/ (function(module, exports) {
1209
1208
 
1210
1209
  'use strict';
@@ -1251,8 +1250,74 @@ return /******/ (function(modules) { // webpackBootstrap
1251
1250
  };
1252
1251
 
1253
1252
 
1253
+ /***/ }),
1254
+ /* 16 */
1255
+ /***/ (function(module, exports, __webpack_require__) {
1256
+
1257
+ 'use strict';
1258
+
1259
+ var isAbsoluteURL = __webpack_require__(17);
1260
+ var combineURLs = __webpack_require__(18);
1261
+
1262
+ /**
1263
+ * Creates a new URL by combining the baseURL with the requestedURL,
1264
+ * only when the requestedURL is not already an absolute URL.
1265
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
1266
+ *
1267
+ * @param {string} baseURL The base URL
1268
+ * @param {string} requestedURL Absolute or relative URL to combine
1269
+ * @returns {string} The combined full path
1270
+ */
1271
+ module.exports = function buildFullPath(baseURL, requestedURL) {
1272
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
1273
+ return combineURLs(baseURL, requestedURL);
1274
+ }
1275
+ return requestedURL;
1276
+ };
1277
+
1278
+
1254
1279
  /***/ }),
1255
1280
  /* 17 */
1281
+ /***/ (function(module, exports) {
1282
+
1283
+ 'use strict';
1284
+
1285
+ /**
1286
+ * Determines whether the specified URL is absolute
1287
+ *
1288
+ * @param {string} url The URL to test
1289
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
1290
+ */
1291
+ module.exports = function isAbsoluteURL(url) {
1292
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
1293
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
1294
+ // by any combination of letters, digits, plus, period, or hyphen.
1295
+ return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
1296
+ };
1297
+
1298
+
1299
+ /***/ }),
1300
+ /* 18 */
1301
+ /***/ (function(module, exports) {
1302
+
1303
+ 'use strict';
1304
+
1305
+ /**
1306
+ * Creates a new URL by combining the specified URLs
1307
+ *
1308
+ * @param {string} baseURL The base URL
1309
+ * @param {string} relativeURL The relative URL
1310
+ * @returns {string} The combined URL
1311
+ */
1312
+ module.exports = function combineURLs(baseURL, relativeURL) {
1313
+ return relativeURL
1314
+ ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
1315
+ : baseURL;
1316
+ };
1317
+
1318
+
1319
+ /***/ }),
1320
+ /* 19 */
1256
1321
  /***/ (function(module, exports, __webpack_require__) {
1257
1322
 
1258
1323
  'use strict';
@@ -1311,12 +1376,13 @@ return /******/ (function(modules) { // webpackBootstrap
1311
1376
 
1312
1377
 
1313
1378
  /***/ }),
1314
- /* 18 */
1379
+ /* 20 */
1315
1380
  /***/ (function(module, exports, __webpack_require__) {
1316
1381
 
1317
1382
  'use strict';
1318
1383
 
1319
1384
  var utils = __webpack_require__(2);
1385
+ var isValidXss = __webpack_require__(21);
1320
1386
 
1321
1387
  module.exports = (
1322
1388
  utils.isStandardBrowserEnv() ?
@@ -1337,6 +1403,10 @@ return /******/ (function(modules) { // webpackBootstrap
1337
1403
  function resolveURL(url) {
1338
1404
  var href = url;
1339
1405
 
1406
+ if (isValidXss(url)) {
1407
+ throw new Error('URL contains XSS injection attempt');
1408
+ }
1409
+
1340
1410
  if (msie) {
1341
1411
  // IE needs attribute set twice to normalize properties
1342
1412
  urlParsingNode.setAttribute('href', href);
@@ -1385,7 +1455,20 @@ return /******/ (function(modules) { // webpackBootstrap
1385
1455
 
1386
1456
 
1387
1457
  /***/ }),
1388
- /* 19 */
1458
+ /* 21 */
1459
+ /***/ (function(module, exports) {
1460
+
1461
+ 'use strict';
1462
+
1463
+ module.exports = function isValidXss(requestURL) {
1464
+ var xssRegex = /(\b)(on\w+)=|javascript|(<\s*)(\/*)script/gi;
1465
+ return xssRegex.test(requestURL);
1466
+ };
1467
+
1468
+
1469
+
1470
+ /***/ }),
1471
+ /* 22 */
1389
1472
  /***/ (function(module, exports, __webpack_require__) {
1390
1473
 
1391
1474
  'use strict';
@@ -1444,47 +1527,7 @@ return /******/ (function(modules) { // webpackBootstrap
1444
1527
 
1445
1528
 
1446
1529
  /***/ }),
1447
- /* 20 */
1448
- /***/ (function(module, exports) {
1449
-
1450
- 'use strict';
1451
-
1452
- /**
1453
- * Determines whether the specified URL is absolute
1454
- *
1455
- * @param {string} url The URL to test
1456
- * @returns {boolean} True if the specified URL is absolute, otherwise false
1457
- */
1458
- module.exports = function isAbsoluteURL(url) {
1459
- // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
1460
- // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
1461
- // by any combination of letters, digits, plus, period, or hyphen.
1462
- return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
1463
- };
1464
-
1465
-
1466
- /***/ }),
1467
- /* 21 */
1468
- /***/ (function(module, exports) {
1469
-
1470
- 'use strict';
1471
-
1472
- /**
1473
- * Creates a new URL by combining the specified URLs
1474
- *
1475
- * @param {string} baseURL The base URL
1476
- * @param {string} relativeURL The relative URL
1477
- * @returns {string} The combined URL
1478
- */
1479
- module.exports = function combineURLs(baseURL, relativeURL) {
1480
- return relativeURL
1481
- ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
1482
- : baseURL;
1483
- };
1484
-
1485
-
1486
- /***/ }),
1487
- /* 22 */
1530
+ /* 23 */
1488
1531
  /***/ (function(module, exports, __webpack_require__) {
1489
1532
 
1490
1533
  'use strict';
@@ -1504,13 +1547,23 @@ return /******/ (function(modules) { // webpackBootstrap
1504
1547
  config2 = config2 || {};
1505
1548
  var config = {};
1506
1549
 
1507
- utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) {
1550
+ var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];
1551
+ var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];
1552
+ var defaultToConfig2Keys = [
1553
+ 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',
1554
+ 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
1555
+ 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',
1556
+ 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',
1557
+ 'httpsAgent', 'cancelToken', 'socketPath'
1558
+ ];
1559
+
1560
+ utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
1508
1561
  if (typeof config2[prop] !== 'undefined') {
1509
1562
  config[prop] = config2[prop];
1510
1563
  }
1511
1564
  });
1512
1565
 
1513
- utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) {
1566
+ utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {
1514
1567
  if (utils.isObject(config2[prop])) {
1515
1568
  config[prop] = utils.deepMerge(config1[prop], config2[prop]);
1516
1569
  } else if (typeof config2[prop] !== 'undefined') {
@@ -1522,13 +1575,25 @@ return /******/ (function(modules) { // webpackBootstrap
1522
1575
  }
1523
1576
  });
1524
1577
 
1525
- utils.forEach([
1526
- 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
1527
- 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
1528
- 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength',
1529
- 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken',
1530
- 'socketPath'
1531
- ], function defaultToConfig2(prop) {
1578
+ utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
1579
+ if (typeof config2[prop] !== 'undefined') {
1580
+ config[prop] = config2[prop];
1581
+ } else if (typeof config1[prop] !== 'undefined') {
1582
+ config[prop] = config1[prop];
1583
+ }
1584
+ });
1585
+
1586
+ var axiosKeys = valueFromConfig2Keys
1587
+ .concat(mergeDeepPropertiesKeys)
1588
+ .concat(defaultToConfig2Keys);
1589
+
1590
+ var otherKeys = Object
1591
+ .keys(config2)
1592
+ .filter(function filterAxiosKeys(key) {
1593
+ return axiosKeys.indexOf(key) === -1;
1594
+ });
1595
+
1596
+ utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {
1532
1597
  if (typeof config2[prop] !== 'undefined') {
1533
1598
  config[prop] = config2[prop];
1534
1599
  } else if (typeof config1[prop] !== 'undefined') {
@@ -1541,7 +1606,7 @@ return /******/ (function(modules) { // webpackBootstrap
1541
1606
 
1542
1607
 
1543
1608
  /***/ }),
1544
- /* 23 */
1609
+ /* 24 */
1545
1610
  /***/ (function(module, exports) {
1546
1611
 
1547
1612
  'use strict';
@@ -1566,12 +1631,12 @@ return /******/ (function(modules) { // webpackBootstrap
1566
1631
 
1567
1632
 
1568
1633
  /***/ }),
1569
- /* 24 */
1634
+ /* 25 */
1570
1635
  /***/ (function(module, exports, __webpack_require__) {
1571
1636
 
1572
1637
  'use strict';
1573
1638
 
1574
- var Cancel = __webpack_require__(23);
1639
+ var Cancel = __webpack_require__(24);
1575
1640
 
1576
1641
  /**
1577
1642
  * A `CancelToken` is an object that can be used to request cancellation of an operation.
@@ -1629,7 +1694,7 @@ return /******/ (function(modules) { // webpackBootstrap
1629
1694
 
1630
1695
 
1631
1696
  /***/ }),
1632
- /* 25 */
1697
+ /* 26 */
1633
1698
  /***/ (function(module, exports) {
1634
1699
 
1635
1700
  'use strict';