Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "rox-base", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Rollout.io ROX JS SDK Base", | ||
@@ -5,0 +5,0 @@ "author": "Rollout.io <support@rollout.io>", |
@@ -15,7 +15,4 @@ import { get } from 'axios'; | ||
const fetchFromCDN = function(cache_miss_url) { | ||
if (!cache_miss_url) { | ||
return Promise.reject(); | ||
} | ||
return get(cache_miss_url).then(({ data, status }) => { | ||
const fetchFromCDN = function(cache_url) { | ||
return get(cache_url).then(({ data, status }) => { | ||
if (status === 200 && data && data.constructor === Object) { | ||
@@ -29,4 +26,5 @@ RoxLogger.debug('succeed fetch from CDN'); | ||
export function fetchRemoteConfiguration(properties = {}) { | ||
return fetchFromCDN(properties.cache_miss_url) | ||
export function fetchRemoteConfiguration(properties) { | ||
const cache_url = `${properties.cache_miss_url}?distinct_id=${properties.distinct_id}`; | ||
return fetchFromCDN(cache_url) | ||
.catch(() => fetchFromAPI(buildAPIURL(properties))) | ||
@@ -33,0 +31,0 @@ .catch(err => { |
@@ -27,4 +27,4 @@ import Config from '../config'; | ||
properties.buid_generators_list = BUID.GENERATOR_LIST.join(','); | ||
properties.cache_miss_url = `${Config.get('CD_S3_ENDPOINT')}${properties.buid}?distinct_id=${properties.distinct_id}`; | ||
properties.cache_miss_url = `${Config.get('CD_S3_ENDPOINT')}${properties.buid}`; | ||
return properties; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1523223
10586