@alore/auth-react-sdk 1.1.0-alpha.4 → 1.1.0-alpha.5
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/utils/AloreAuth.js +2 -1
- package/package.json +1 -1
package/dist/utils/AloreAuth.js
CHANGED
|
@@ -533,8 +533,9 @@ export class AloreAuth {
|
|
|
533
533
|
const { maxAttempts = 3, initialDelay = 200 } = config || {};
|
|
534
534
|
let attempt = 0;
|
|
535
535
|
let delayValue = initialDelay;
|
|
536
|
+
const isLocal = this.aloreBaseUrl.includes('localhost') || this.aloreBaseUrl.includes('127.0.0.1');
|
|
536
537
|
// eslint-disable-next-line no-undef
|
|
537
|
-
const init = Object.assign(Object.assign({}, options), { credentials: 'include', headers: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.headers), { 'X-CLIENT-ID': this.clientId, 'CF-Connecting-IP': '127.0.0.1' }) });
|
|
538
|
+
const init = Object.assign(Object.assign({}, options), { credentials: 'include', headers: Object.assign(Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.headers), { 'X-CLIENT-ID': this.clientId }), (isLocal && { 'CF-Connecting-IP': '127.0.0.1' })) });
|
|
538
539
|
while (attempt < maxAttempts) {
|
|
539
540
|
if (attempt > 0) {
|
|
540
541
|
// eslint-disable-next-line no-await-in-loop, no-promise-executor-return, no-loop-func
|