Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions apps/nebula/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ const baseNextConfig: NextConfig = {
},
productionBrowserSourceMaps: false,
reactStrictMode: true,
async redirects() {
return [
{
source: "/:path*",
destination: "https://thirdweb.com/ai",
permanent: true,
},
];
},
Comment on lines +67 to +75
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Exclude PostHog proxy paths from the global redirect.

This blanket /:path* redirect fires before rewrites(), so the _ph proxies you defined just below will never run—every analytics call (e.g., /_ph/static, /_ph/decide) now 308s to https://thirdweb.com/ai. That effectively breaks PostHog ingestion for the Nebula domain. Please carve out the analytics paths (and any other internal endpoints you still rely on) before landing the catch-all redirect.

[suggested fix]

   async redirects() {
     return [
       {
-        source: "/:path*",
+        source: "/:path((?!_ph(?:/|$)).*)",
         destination: "https://thirdweb.com/ai",
         permanent: true,
       },
     ];
   },
🤖 Prompt for AI Agents
In apps/nebula/next.config.ts around lines 67 to 75, the catch-all redirect
source "/:path*" is swallowing your PostHog proxy endpoints (/_ph/*) before
rewrites run; update the redirect to exclude those internal paths by using a
negative-lookahead regex in the source (for example source: "/((?!_ph).*)") so
requests whose first segment is "_ph" will not match and will continue to
rewrites, and keep the rest of the redirect object (destination and permanent)
unchanged.

async rewrites() {
return [
{
Expand Down
Loading