Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Add agent section to our website + change cache policy for sitemap

Jakub Novak3b9a202f8796
diff --git a/apps/reverse-proxy/app/sitemap.ts b/apps/reverse-proxy/app/sitemap.ts
index e25533d12..169152f6b 100644
--- a/apps/reverse-proxy/app/sitemap.ts
+++ b/apps/reverse-proxy/app/sitemap.ts
@@ -57,7 +57,7 @@ type Sitemap = {
async function getXmlData(url: string): Promise<Sitemap> {
const parser = new XMLParser()
- const response = await fetch(url)
+ const response = await fetch(url, { cache: 'no-cache' })
if (!response.ok) {
return { urlset: { url: [] }}
diff --git a/apps/reverse-proxy/middleware.ts b/apps/reverse-proxy/middleware.ts
index 0ef387d52..9736a3006 100644
--- a/apps/reverse-proxy/middleware.ts
+++ b/apps/reverse-proxy/middleware.ts
@@ -13,6 +13,10 @@ export async function middleware(req: NextRequest): Promise<NextResponse> {
url.hostname = 'e2b-landing-page.framer.website'
}
+ if (url.pathname.startsWith('/ai-agents')) {
+ url.hostname = 'e2b-landing-page.framer.website'
+ }
+
if (url.pathname === '/blog' || url.pathname === '/blog/') {
url.pathname = '/'
url.hostname = 'e2b-blog.framer.website'
@@ -47,5 +51,5 @@ export async function middleware(req: NextRequest): Promise<NextResponse> {
// We should probably filter all /, /blog and /changelog paths here and decide what to do with them in the middleware body.
export const config = {
- matcher: ['/', '/blog/:path*', '/changelog/:path*'],
+ matcher: ['/', '/blog/:path*', '/changelog/:path*', '/ai-agents/:path*'],
}