axios 1.6.0 → 1.6.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.6.2](https://github.com/axios/axios/compare/v1.6.1...v1.6.2) (2023-11-14)
4
+
5
+
6
+ ### Features
7
+
8
+ * **withXSRFToken:** added withXSRFToken option as a workaround to achieve the old `withCredentials` behavior; ([#6046](https://github.com/axios/axios/issues/6046)) ([cff9967](https://github.com/axios/axios/commit/cff996779b272a5e94c2b52f5503ccf668bc42dc))
9
+
10
+ ### PRs
11
+ - feat(withXSRFToken): added withXSRFToken option as a workaround to achieve the old `withCredentials` behavior; ( [#6046](https://api.github.com/repos/axios/axios/pulls/6046) )
12
+ ```
13
+
14
+ 📢 This PR added 'withXSRFToken' option as a replacement for old withCredentials behaviour.
15
+ You should now use withXSRFToken along with withCredential to get the old behavior.
16
+ This functionality is considered as a fix.
17
+ ```
18
+
19
+ ### Contributors to this release
20
+
21
+ - <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+271/-146 (#6081 #6080 #6079 #6078 #6046 #6064 #6063 )")
22
+ - <img src="https://avatars.githubusercontent.com/u/79681367?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Ng Choon Khon (CK)](https://github.com/ckng0221 "+4/-4 (#6073 )")
23
+ - <img src="https://avatars.githubusercontent.com/u/9162827?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Muhammad Noman](https://github.com/mnomanmemon "+2/-2 (#6048 )")
24
+
25
+ ## [1.6.1](https://github.com/axios/axios/compare/v1.6.0...v1.6.1) (2023-11-08)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **formdata:** fixed content-type header normalization for non-standard browser environments; ([#6056](https://github.com/axios/axios/issues/6056)) ([dd465ab](https://github.com/axios/axios/commit/dd465ab22bbfa262c6567be6574bf46a057d5288))
31
+ * **platform:** fixed emulated browser detection in node.js environment; ([#6055](https://github.com/axios/axios/issues/6055)) ([3dc8369](https://github.com/axios/axios/commit/3dc8369e505e32a4e12c22f154c55fd63ac67fbb))
32
+
33
+ ### Contributors to this release
34
+
35
+ - <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+432/-65 (#6059 #6056 #6055 )")
36
+ - <img src="https://avatars.githubusercontent.com/u/3982806?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Fabian Meyer](https://github.com/meyfa "+5/-2 (#5835 )")
37
+
38
+ ### PRs
39
+ - feat(withXSRFToken): added withXSRFToken option as a workaround to achieve the old &#x60;withCredentials&#x60; behavior; ( [#6046](https://api.github.com/repos/axios/axios/pulls/6046) )
40
+ ```
41
+
42
+ 📢 This PR added &#x27;withXSRFToken&#x27; option as a replacement for old withCredentials behaviour.
43
+ You should now use withXSRFToken along with withCredential to get the old behavior.
44
+ This functionality is considered as a fix.
45
+ ```
46
+
3
47
  # [1.6.0](https://github.com/axios/axios/compare/v1.5.1...v1.6.0) (2023-10-26)
4
48
 
5
49
 
package/README.md CHANGED
@@ -452,6 +452,9 @@ These are the available config options for making requests. Only the `url` is re
452
452
 
453
453
  // `xsrfHeaderName` is the name of the http header that carries the xsrf token value
454
454
  xsrfHeaderName: 'X-XSRF-TOKEN', // default
455
+
456
+ // `undefined` (default) - set XSRF header only for the same origin requests
457
+ withXSRFToken: boolean | undefined | ((config: InternalAxiosRequestConfig) => boolean | undefined),
455
458
 
456
459
  // `onUploadProgress` allows handling of progress events for uploads
457
460
  // browser & node.js
@@ -543,7 +546,7 @@ These are the available config options for making requests. Only the `url` is re
543
546
  // automatically. If set to `true` will also remove the 'content-encoding' header
544
547
  // from the responses objects of all decompressed responses
545
548
  // - Node only (XHR cannot turn off decompression)
546
- decompress: true // default
549
+ decompress: true, // default
547
550
 
548
551
  // `insecureHTTPParser` boolean.
549
552
  // Indicates where to use an insecure HTTP parser that accepts invalid HTTP headers.
@@ -551,7 +554,7 @@ These are the available config options for making requests. Only the `url` is re
551
554
  // Using the insecure parser should be avoided.
552
555
  // see options https://nodejs.org/dist/latest-v12.x/docs/api/http.html#http_http_request_url_options_callback
553
556
  // see also https://nodejs.org/en/blog/vulnerability/february-2020-security-releases/#strict-http-header-parsing-none
554
- insecureHTTPParser: undefined // default
557
+ insecureHTTPParser: undefined, // default
555
558
 
556
559
  // transitional options for backward compatibility that may be removed in the newer versions
557
560
  transitional: {