From 4ec6a64f83ed9c230bd49c3bda9a700b3e2c6227 Mon Sep 17 00:00:00 2001 From: Leechael Yim Date: Tue, 20 Feb 2024 19:26:44 +0800 Subject: [PATCH] build: setup proxy --- src/app/layout.tsx | 3 +++ src/pages/layout.tsx | 2 +- vercel.json | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 vercel.json diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 07383f16..168886d4 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -33,6 +33,9 @@ export default function RootLayout({ ) : null} + {process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID ? ( + + ) : null} {children} diff --git a/src/pages/layout.tsx b/src/pages/layout.tsx index 69ff8989..2888aee3 100644 --- a/src/pages/layout.tsx +++ b/src/pages/layout.tsx @@ -33,7 +33,7 @@ export default function Layout({ ) : null} {process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID ? ( - + ) : null} {children} diff --git a/vercel.json b/vercel.json new file mode 100644 index 00000000..8642d6fc --- /dev/null +++ b/vercel.json @@ -0,0 +1,8 @@ +{ + "rewrites": [ + { + "source": "/stats/:match*", + "destination": "https://phala-umami.vercel.app/:match*" + } + ] +}