Skip to content

Commit c47fdbd

Browse files
authored
Fix: assetPrefix refers to correct domains for production & preview environments (e2b-dev#570)
This pr fixes the following issue for [e2b-dev#569](e2b-dev#569): The production vercel environment did not refer assets to the correct production domain through VERCEL_URL. Hence a custom environment variable was added to the production environment to account for that.
2 parents 5e2a23f + 28748ee commit c47fdbd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/web/next.config.mjs

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ const nextConfig = {
5050
basePath: '',
5151
assetPrefix:
5252
process.env.NODE_ENV === 'production'
53-
? `https://${process.env.VERCEL_URL}`
53+
? `https://${
54+
process.env.DASHBOARD_PROXY_DOMAIN ?? process.env.VERCEL_URL
55+
}`
5456
: undefined,
5557
headers: async () => [
5658
{

0 commit comments

Comments
 (0)