Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(env): cleanup environment variables #100

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ MJ_APIKEY_PRIVATE=""
# Used to configure the communication with WordPress
BACKEND_URL="http://127.0.0.1:8000"
WORDPRESS_API_URL=$BACKEND_URL/graphql
NEXT_PUBLIC_PROTOCOL="https"

# Used to determine the front URL
NEXT_PUBLIC_PROTOCOL="http"
VERCEL_URL="localhost:3000"
NEXT_PUBLIC_FRONT_URL=$VERCEL_URL
NEXT_PUBLIC_FRONT_DOMAIN=$VERCEL_URL
NEXT_PUBLIC_FRONT_URL=$NEXT_PUBLIC_PROTOCOL://$NEXT_PUBLIC_FRONT_DOMAIN

# Used by Slack to send a notification to the Slack channel
SLACK_WEBHOOK_URL=""

# Only required if you want to enable preview mode
# WORDPRESS_AUTH_REFRESH_TOKEN=
# WORDPRESS_PREVIEW_SECRET=

# Used by Sentry to send errors to the Sentry dashboard
SENTRY_DSN=
2 changes: 1 addition & 1 deletion src/app/libs/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const getCanonicalUrl = (part: string = ''): string => {
export const replaceBackendUrlContent = (content: string): string => {
return content.replace(
process.env.BACKEND_URL as string,
`https://${process.env.VERCEL_URL}`
process.env.NEXT_PUBLIC_FRONT_URL as string
);
};

Expand Down