teraprox-core-sdk 0.3.9 → 0.3.10
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/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -389,7 +389,9 @@ var CoreServiceBuilder = class {
|
|
|
389
389
|
controller.context = context;
|
|
390
390
|
return controller;
|
|
391
391
|
}
|
|
392
|
-
const
|
|
392
|
+
const _globalObject = typeof window !== "undefined" ? window : globalThis;
|
|
393
|
+
const globalProcess = _globalObject.process || { env: {} };
|
|
394
|
+
const envHost = globalProcess.env ? globalProcess.env.REACT_APP_TERAPROX_GATEWAY_HOST || globalProcess.env.VITE_TERAPROX_GATEWAY_HOST : void 0;
|
|
393
395
|
const hostHeader = this._gatewayHost || envHost || context;
|
|
394
396
|
const extraHeaders = { "x-teraprox-host": hostHeader };
|
|
395
397
|
return this._tracing ? new TracingHttpAdapter(endpoint, extraHeaders) : new FetchHttpAdapter(endpoint, extraHeaders);
|
package/dist/index.mjs
CHANGED
|
@@ -284,7 +284,9 @@ var CoreServiceBuilder = class {
|
|
|
284
284
|
controller.context = context;
|
|
285
285
|
return controller;
|
|
286
286
|
}
|
|
287
|
-
const
|
|
287
|
+
const _globalObject = typeof window !== "undefined" ? window : globalThis;
|
|
288
|
+
const globalProcess = _globalObject.process || { env: {} };
|
|
289
|
+
const envHost = globalProcess.env ? globalProcess.env.REACT_APP_TERAPROX_GATEWAY_HOST || globalProcess.env.VITE_TERAPROX_GATEWAY_HOST : void 0;
|
|
288
290
|
const hostHeader = this._gatewayHost || envHost || context;
|
|
289
291
|
const extraHeaders = { "x-teraprox-host": hostHeader };
|
|
290
292
|
return this._tracing ? new TracingHttpAdapter(endpoint, extraHeaders) : new FetchHttpAdapter(endpoint, extraHeaders);
|
package/package.json
CHANGED