Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Add api redirects

Jakub Novak418b756d3d77
diff --git a/apps/docs/src/app/(dashboard)/api/layout.tsx b/apps/docs/src/app/(dashboard)/api/layout.tsx
index a7edd6dfb..4abfc48be 100644
--- a/apps/docs/src/app/(dashboard)/api/layout.tsx
+++ b/apps/docs/src/app/(dashboard)/api/layout.tsx
@@ -1,3 +1,4 @@
+import { headers } from 'next/headers'
import { Metadata } from 'next'
export const metadata: Metadata = {
@@ -21,9 +22,16 @@ export default function RootLayout({
}: {
children: React.ReactNode
}) {
+ const heads = headers()
+
+ const pathname = heads.get('next-url')
+
return (
<html lang="en">
- <body>{children}</body>
+ <body>
+ <span>URL: {pathname}</span>
+ {children}
+ </body>
</html>
)
}
diff --git a/apps/reverse-proxy/vercel.json b/apps/reverse-proxy/vercel.json
index 5285f07b8..00dac7780 100644
--- a/apps/reverse-proxy/vercel.json
+++ b/apps/reverse-proxy/vercel.json
@@ -53,6 +53,16 @@
"value": "e2b.dev"
}
]
+ },
+ {
+ "source": "/api/:path*",
+ "destination": "https://e2b-docs-e2b.vercel.app/api/:path*",
+ "has": [
+ {
+ "type": "host",
+ "value": "e2b.dev"
+ }
+ ]
}
],
"redirects": [