Skip to content

Commit

Permalink
build: setup proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Leechael committed Feb 20, 2024
1 parent f3f7f5e commit 4ec6a64
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export default function RootLayout({
</Script>
</>
) : null}
{process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID ? (
<Script async src={`/stats/script.js`} data-website-id={process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID}></Script>
) : null}
{children}
<SiteNav />
<SiteFooter />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Layout({
</>
) : null}
{process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID ? (
<Script async src={`https://${process.env.NEXT_PUBLIC_UMAMI_DOMAIN}/script.js`} data-website-id={process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID}></Script>
<Script async src={`/stats/script.js`} data-website-id={process.env.NEXT_PUBLIC_UMAMI_WEBSITE_ID}></Script>
) : null}
<SiteNav />
{children}
Expand Down
8 changes: 8 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"rewrites": [
{
"source": "/stats/:match*",
"destination": "https://phala-umami.vercel.app/:match*"
}
]
}

0 comments on commit 4ec6a64

Please sign in to comment.