roboto-js 1.1.12 → 1.1.13
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/dist/cjs/index.cjs +3 -2
- package/dist/esm/index.js +3 -2
- package/package.json +1 -1
- package/src/index.js +4 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -52,8 +52,9 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
// DEVELOPMENT
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
var baseUrl = new URL(this.config.baseUrl);
|
|
56
|
+
if (baseUrl.hostname === 'rbt.dorfio.com' || baseUrl.hostname.startsWith('localhost')) {
|
|
57
|
+
this.config.baseUrl = url.toString().replace(/^https:/, 'http:');
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
// Check if a request object is provided
|
package/dist/esm/index.js
CHANGED
|
@@ -20,8 +20,9 @@ export default class Roboto {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
// DEVELOPMENT
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const baseUrl = new URL(this.config.baseUrl);
|
|
24
|
+
if (baseUrl.hostname === 'rbt.dorfio.com' || baseUrl.hostname.startsWith('localhost')) {
|
|
25
|
+
this.config.baseUrl = url.toString().replace(/^https:/, 'http:');
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
// Check if a request object is provided
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -31,10 +31,12 @@ export default class Roboto{
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
// DEVELOPMENT
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
const baseUrl = new URL(this.config.baseUrl);
|
|
35
|
+
if (baseUrl.hostname === 'rbt.dorfio.com' || baseUrl.hostname.startsWith('localhost')) {
|
|
36
|
+
this.config.baseUrl = url.toString().replace(/^https:/, 'http:');
|
|
36
37
|
}
|
|
37
38
|
|
|
39
|
+
|
|
38
40
|
// Check if a request object is provided
|
|
39
41
|
if (proxyReq && proxyReq.headers) {
|
|
40
42
|
const authtoken = proxyReq.headers.authtoken;
|