@lucaapp/service-utils 5.24.4 → 5.24.5
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.
|
@@ -213,9 +213,14 @@ class ServiceIdentity {
|
|
|
213
213
|
});
|
|
214
214
|
if (!debug) {
|
|
215
215
|
this.axiosClient.interceptors.response.use(response => response, error => {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
delete
|
|
216
|
+
const headers = error?.config?.headers;
|
|
217
|
+
if (headers) {
|
|
218
|
+
if (typeof headers.delete === 'function') {
|
|
219
|
+
headers.delete(JWT_HEADER_NAME);
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
delete headers[JWT_HEADER_NAME];
|
|
223
|
+
}
|
|
219
224
|
}
|
|
220
225
|
return Promise.reject(error);
|
|
221
226
|
});
|