@eluvio/elv-client-js 4.2.20 → 4.2.21
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/package.json +1 -1
- package/src/HttpClient.js +7 -0
package/package.json
CHANGED
package/src/HttpClient.js
CHANGED
|
@@ -96,6 +96,13 @@ class HttpClient {
|
|
|
96
96
|
// Save current URI for all future requests involving this write token
|
|
97
97
|
this.draftURIs[writeToken] = baseURI;
|
|
98
98
|
}
|
|
99
|
+
|
|
100
|
+
// If write token is present in headers, we may get redirected even if we try and use the right node.
|
|
101
|
+
// When a network request is redirected, the authorization header is dropped, which will cause issues.
|
|
102
|
+
// Ensure it is present in query params as well
|
|
103
|
+
if((headers.Authorization || headers.authorization) && !queryParams.authorization) {
|
|
104
|
+
queryParams.authorization = headers.Authorization || headers.authorization;
|
|
105
|
+
}
|
|
99
106
|
}
|
|
100
107
|
|
|
101
108
|
let uri = baseURI
|