@product7/product7-js 0.2.0 → 0.2.1
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/package.json
CHANGED
|
@@ -35,13 +35,7 @@ export class BaseAPIService {
|
|
|
35
35
|
if (!env || env === 'production') {
|
|
36
36
|
const hostname =
|
|
37
37
|
(typeof window !== 'undefined' && window.location?.hostname) || '';
|
|
38
|
-
|
|
39
|
-
hostname === 'localhost' ||
|
|
40
|
-
hostname === '127.0.0.1' ||
|
|
41
|
-
/^192\.168\./.test(hostname) ||
|
|
42
|
-
/^10\./.test(hostname) ||
|
|
43
|
-
/^172\.(1[6-9]|2\d|3[01])\./.test(hostname);
|
|
44
|
-
if (hostname.includes('staging') || isLocal) {
|
|
38
|
+
if (hostname.includes('staging')) {
|
|
45
39
|
env = 'staging';
|
|
46
40
|
}
|
|
47
41
|
}
|
package/src/core/Product7.js
CHANGED
|
@@ -727,12 +727,7 @@ export class Product7 {
|
|
|
727
727
|
|
|
728
728
|
const hostname = window.location.hostname.toLowerCase();
|
|
729
729
|
|
|
730
|
-
if (
|
|
731
|
-
hostname.includes('staging') ||
|
|
732
|
-
hostname.includes('localhost') ||
|
|
733
|
-
hostname.includes('127.0.0.1') ||
|
|
734
|
-
hostname.includes('.local')
|
|
735
|
-
) {
|
|
730
|
+
if (hostname.includes('staging')) {
|
|
736
731
|
return 'staging';
|
|
737
732
|
}
|
|
738
733
|
|