mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 07:56:59 +00:00
Adds bracket checking in SHOPIFY_STORE_DOMAIN
This commit is contained in:
parent
56597dc2b3
commit
acc59e99f9
@ -23,4 +23,8 @@ export const validateEnvironmentVariables = () => {
|
|||||||
if (missingEnvironmentVariables.length) {
|
if (missingEnvironmentVariables.length) {
|
||||||
throw new Error(`The following environment variables are missing. Your site will not work without them.\n\n${missingEnvironmentVariables.join('\n')}\n`);
|
throw new Error(`The following environment variables are missing. Your site will not work without them.\n\n${missingEnvironmentVariables.join('\n')}\n`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (process.env.SHOPIFY_STORE_DOMAIN?.includes('[') || process.env.SHOPIFY_STORE_DOMAIN?.includes(']')) {
|
||||||
|
throw new Error('Your `SHOPIFY_STORE_DOMAIN` environment variable includes brackets (ie. `[` and / or `]`). Your site will not work with them there. Please remove them.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user