roboto-js 1.1.12 → 1.1.14
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 +5 -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,9 +52,12 @@ var Roboto = exports["default"] = /*#__PURE__*/function () {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
// DEVELOPMENT
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
function stripHttpsForDomains(baseUrl, domains) {
|
|
56
|
+
return baseUrl.replace(new RegExp("^https://(".concat(domains.map(function (domain) {
|
|
57
|
+
return domain.replace(/\./g, '\\.');
|
|
58
|
+
}).join('|'), ")")), 'http://$1');
|
|
57
59
|
}
|
|
60
|
+
this.config.baseUrl = stripHttpsForDomains(this.config.baseUrl, ['localhost', 'rbt.dorfio.com']);
|
|
58
61
|
|
|
59
62
|
// Check if a request object is provided
|
|
60
63
|
if (proxyReq && proxyReq.headers) {
|
package/dist/esm/index.js
CHANGED
|
@@ -20,9 +20,10 @@ export default class Roboto {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
// DEVELOPMENT
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
function stripHttpsForDomains(baseUrl, domains) {
|
|
24
|
+
return baseUrl.replace(new RegExp(`^https://(${domains.map(domain => domain.replace(/\./g, '\\.')).join('|')})`), 'http://$1');
|
|
25
25
|
}
|
|
26
|
+
this.config.baseUrl = stripHttpsForDomains(this.config.baseUrl, ['localhost', 'rbt.dorfio.com']);
|
|
26
27
|
|
|
27
28
|
// Check if a request object is provided
|
|
28
29
|
if (proxyReq && proxyReq.headers) {
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -31,9 +31,11 @@ export default class Roboto{
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
// DEVELOPMENT
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
function stripHttpsForDomains(baseUrl, domains) {
|
|
35
|
+
return baseUrl.replace(new RegExp(`^https://(${domains.map(domain => domain.replace(/\./g, '\\.')).join('|')})`), 'http://$1');
|
|
36
36
|
}
|
|
37
|
+
this.config.baseUrl = stripHttpsForDomains(this.config.baseUrl, ['localhost','rbt.dorfio.com']);
|
|
38
|
+
|
|
37
39
|
|
|
38
40
|
// Check if a request object is provided
|
|
39
41
|
if (proxyReq && proxyReq.headers) {
|