@data-fair/lib-node 2.0.2 → 2.0.3

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.
Files changed (2) hide show
  1. package/axios-auth.js +2 -1
  2. package/package.json +1 -1
package/axios-auth.js CHANGED
@@ -32,7 +32,8 @@ export async function axiosAuth (opts) {
32
32
  }
33
33
  const ax = axiosBuilder(axiosOpts, (ax) => {
34
34
  ax.interceptors.request.use(async (config) => {
35
- config.headers.Cookie = await cookieJar.getCookies(origin)
35
+ const url = (config.baseURL && config.url?.startsWith('/')) ? (config.baseURL + config.url) : config.url
36
+ config.headers.Cookie = await cookieJar.getCookies(url ?? origin)
36
37
  return config
37
38
  })
38
39
  ax.interceptors.response.use(async (res) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-node",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Small nodejs related utility functions for the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [