Skip to content

Commit

Permalink
fix: updates config api to absolute URL
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitb35 committed Apr 10, 2023
1 parent 6aed657 commit 820cc46
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ AUTH0_CUSTOM_DOMAIN=accounts.plant-for-the-planet.org
API_ENDPOINT=app.plant-for-the-planet.org

CDN_URL=cdn.plant-for-the-planet.org
CONFIG_URL=

ESRI_CLIENT_ID=
ESRI_CLIENT_SECRET=
Expand All @@ -19,4 +20,4 @@ SENTRY_AUTH_TOKEN=
SOURCE_VERSION=
RECURRENCY=true

TRACKING_KEY =
TRACKING_KEY=
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const nextConfig = {
CDN_URL: `${scheme}://${process.env.CDN_URL}`,
APP_URL: APPUrl,
VERCEL_URL: process.env.VERCEL_URL,
CONFIG_URL: process.env.CONFIG_URL,
ESRI_CLIENT_ID: process.env.ESRI_CLIENT_ID,
ESRI_CLIENT_SECRET: process.env.ESRI_CLIENT_SECRET,
RECURRENCY: process.env.RECURRENCY,
Expand Down
2 changes: 1 addition & 1 deletion src/Layout/QueryParamContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ const QueryParamProvider: FC = ({ children }) => {
async function loadConfig() {
try {
const requestParams = {
url: `/app/config`,
url: process.env.CONFIG_URL || `/app/config`,
setshowErrorCard,
shouldQueryParamAdd: false,
};
Expand Down

0 comments on commit 820cc46

Please sign in to comment.