corebasic 1.0.115 → 1.0.116
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/libs/features.js +12 -1
- package/package.json +1 -1
package/libs/features.js
CHANGED
|
@@ -56,7 +56,18 @@ export const send = async (meta, feature, data, params) => {
|
|
|
56
56
|
service = service.replace('http://slyp.app', 'https://slyp.app')
|
|
57
57
|
|
|
58
58
|
// return (await axios[method](`${service}${url}`, { data: payload, headers: {jwt: headers.jwt}, timeout: 1000 })).data
|
|
59
|
-
|
|
59
|
+
|
|
60
|
+
// Used to work. But request to 127.0.0.1 fails to send the specified headers along with the request.
|
|
61
|
+
// return (await axios[method](`${service}${url}`, payload, {headers: {jwt: SERVICE_ACCESS_TOKEN, service: true}, timeout: 1000 })).data // Worked Earlier, but issue spotted
|
|
62
|
+
|
|
63
|
+
// Workaround: https://stackoverflow.com/questions/72343387/axios-not-sending-headers-request-failing-getting-401-error
|
|
64
|
+
return (await axios({
|
|
65
|
+
method,
|
|
66
|
+
url: `${service}${url}`,
|
|
67
|
+
headers: { jwt: SERVICE_ACCESS_TOKEN, service: true },
|
|
68
|
+
data: payload,
|
|
69
|
+
timeout: 1000
|
|
70
|
+
})).data;
|
|
60
71
|
}
|
|
61
72
|
|
|
62
73
|
let appids = {}
|