@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.
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alore/auth-react-sdk",
3
- "version": "1.1.0-alpha.4",
3
+ "version": "1.1.0-alpha.5",
4
4
  "repository": "https://github.com/0xCarbon/alore-js",
5
5
  "description": "SDK for Alore Auth",
6
6
  "main": "dist/index.js",