Skip to content

Commit

Permalink
fix: add CONFIG_URL to env
Browse files Browse the repository at this point in the history
- as /app/config is always called from production
  • Loading branch information
mohitb35 committed May 16, 2022
1 parent be1ba96 commit 236950b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ CDN_URL=cdn.plant-for-the-planet.org/development
# for vegetation change
SITE_IMAGERY_API_URL=https://raster.plant-for-the-planet.org
WIDGET_URL=https://widgets.plant-for-the-planet.org
NEXT_PUBLIC_DONATION_URL=https://donate.plant-for-the-planet.org
NEXT_PUBLIC_DONATION_URL=https://donate.plant-for-the-planet.org
CONFIG_URL=https://app.plant-for-the-planet.org/app/config
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ BROWSERSTACK_BUILD_NAME=plant-webapp
BROWSERSTACK_PROJECT_NAME=plant-webapp
BROWSERSTACK_TEST_URL=
TEST_MFA_URL=
NEXT_PUBLIC_DONATION_URL=
NEXT_PUBLIC_DONATION_URL=
CONFIG_URL=
3 changes: 2 additions & 1 deletion .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ VERCEL_GITHUB_COMMIT_SHA=
# for vegetation change
SITE_IMAGERY_API_URL=https://raster.plant-for-the-planet.org
WIDGET_URL=https://widgets.plant-for-the-planet.org
NEXT_PUBLIC_DONATION_URL=https://donate.plant-for-the-planet.org
NEXT_PUBLIC_DONATION_URL=https://donate.plant-for-the-planet.org
CONFIG_URL=https://app.plant-for-the-planet.org/app/config
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ SENTRY_PROJECT=app-20-next
SITE_IMAGERY_API_URL=https://raster.plant-for-the-planet.org
WIDGET_URL=https://widgets.plant-for-the-planet.org
NEXT_PUBLIC_DONATION_URL=https://donate.plant-for-the-planet.org
CONFIG_URL=https://app.plant-for-the-planet.org/app/config
2 changes: 1 addition & 1 deletion src/utils/storeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function storeConfig() {
} else {
userLang = 'en';
}
await fetch(`${process.env.API_ENDPOINT}/app/config`, {
await fetch(`${process.env.CONFIG_URL}`, {
headers: {
'tenant-key': `${TENANT_ID}`,
'X-SESSION-ID': await getsessionId(),
Expand Down

0 comments on commit 236950b

Please sign in to comment.