Skip to content

armgit / E2B

Public Imported from GitHub
0

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

redirect `/blog` to the new blog website

Vasek Mlejnskyffb6cefb27df
diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts
index 40c6c1af9..a7a333e6b 100644
--- a/apps/web/src/middleware.ts
+++ b/apps/web/src/middleware.ts
@@ -3,7 +3,6 @@ import { replaceUrls } from '@/utils/replaceUrls'
import {
landingPageHostname,
landingPageFramerHostname,
- blogFramerHostname,
} from '@/app/hostnames'
export async function middleware(req: NextRequest): Promise<NextResponse> {
@@ -42,19 +41,15 @@ export async function middleware(req: NextRequest): Promise<NextResponse> {
url.hostname = landingPageHostname
}
+ if (url.pathname.startsWith('/blog')) {
+ url.hostname = landingPageHostname
+ }
+
// TODO: Not on the new landing page hosting yet
if (url.pathname.startsWith('/ai-agents')) {
url.hostname = landingPageFramerHostname
}
- if (url.pathname === '/blog' || url.pathname === '/blog/') {
- url.pathname = '/'
- url.hostname = blogFramerHostname
- }
- if (url.pathname.startsWith('/blog')) {
- url.hostname = blogFramerHostname
- }
-
const res = await fetch(url.toString(), { ...req })
const htmlBody = await res.text()