Browse Source

added isDevDeployment description

Abhinav 2 years ago
parent
commit
2f9b679b24
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/utils/common/apiUtil.ts

+ 6 - 0
src/utils/common/apiUtil.ts

@@ -70,6 +70,12 @@ export const getSentryTunnelURL = () => {
     return `https://sentry-reporter.ente.io`;
     return `https://sentry-reporter.ente.io`;
 };
 };
 
 
+/*
+It's a dev deployment (and should use the environment override for endpoints ) in three cases:
+1. when the URL opened is that of the staging web app, or
+2. when the URL opened is that of the staging album app, or
+3. if the app is running locally (hence node_env is development)
+*/
 const isDevDeployment = () =>
 const isDevDeployment = () =>
     runningInBrowser() &&
     runningInBrowser() &&
     (process.env.NEXT_PUBLIC_ENTE_WEB_ENDPOINT === window.location.origin ||
     (process.env.NEXT_PUBLIC_ENTE_WEB_ENDPOINT === window.location.origin ||