diff --git a/helpers/url.ts b/helpers/url.ts index df9f9a2..dea0c06 100644 --- a/helpers/url.ts +++ b/helpers/url.ts @@ -1,6 +1,12 @@ -const URL = process.env.VERCEL_URL - ? `https://${process.env.VERCEL_URL}` - : 'http://localhost:3000' +let URL: string + +if (process.env.SITE_URL) { + URL = `https://${process.env.SITE_URL}` +} else if (process.env.VERCEL_URL) { + URL = `https://${process.env.VERCEL_URL}` +} else { + URL = 'http://localhost:3000' +} export function getBaseURL(): string { return URL