From 88587ac725c03fa1362e3ad79222a290f4d86cdb Mon Sep 17 00:00:00 2001 From: Vrishab Srivatsa <136090360+vsrivatsa-juspay@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:11:30 +0530 Subject: [PATCH] fix: Added envLoggingUrl in webpack (#294) Co-authored-by: Praful Koppalkar <126236898+prafulkoppalkar@users.noreply.github.com> --- webpack.common.js | 14 ++++++++++---- webpack.dev.js | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/webpack.common.js b/webpack.common.js index f4d6b43b9..c8fc54102 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -11,6 +11,7 @@ const { sentryWebpackPlugin } = require("@sentry/webpack-plugin"); const sdkEnv = process.env.sdkEnv; const envSdkUrl = process.env.envSdkUrl; const envBackendUrl = process.env.envBackendUrl; +const envLoggingUrl = process.env.envLoggingUrl; //git rev-parse --abbrev-ref HEAD let repoVersion = require("./package.json").version; @@ -62,10 +63,15 @@ if (envBackendUrl === undefined) { confirmEndPoint = envBackendUrl; } -let logEndpoint = - sdkEnv === "prod" - ? "https://api.hyperswitch.io/logs/sdk" - : "https://sandbox.hyperswitch.io/logs/sdk"; +let logEndpoint; +if (envLoggingUrl === undefined) { + logEndpoint = + sdkEnv === "prod" + ? "https://api.hyperswitch.io/logs/sdk" + : "https://sandbox.hyperswitch.io/logs/sdk"; +} else { + logEndpoint = envLoggingUrl; +} // Set this to true to enable logging let enableLogging = true; diff --git a/webpack.dev.js b/webpack.dev.js index ce80a9ad4..89044d741 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -16,6 +16,7 @@ let backendEndPoint = let devServer = { contentBase: path.join(__dirname, "dist"), hot: true, + host: "0.0.0.0", port: 9050, historyApiFallback: true, proxy: {