Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Improve assetPrefix configuration for proxy / development setup (#683)

never not exploring34f8f2e244c9
diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs
index ae09b197e..bf256d694 100644
--- a/apps/web/next.config.mjs
+++ b/apps/web/next.config.mjs
@@ -49,10 +49,10 @@ const nextConfig = {
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
basePath: '',
assetPrefix:
- process.env.NODE_ENV === 'production'
- ? `https://${
- process.env.DASHBOARD_PROXY_DOMAIN ?? process.env.VERCEL_URL
- }`
+ // our production next app is proxied by our dashboard next app.
+ // to make assets load correctly after proxying, we need to specify the proxied domain here.
+ process.env.VERCEL_ENV === 'production' && process.env.PRODUCTION_URL
+ ? process.env.PRODUCTION_URL
: undefined,
headers: async () => [
{