Skip to content

Commit

Permalink
feat(PostHog): proxy using Cloudflare Workers (#1601)
Browse files Browse the repository at this point in the history
* feat: use the test cf worker for posthog

* cleanup: remove posthog rewrite from next config

* switch back to prod project
  • Loading branch information
BrickheadJohnny authored Feb 12, 2025
1 parent 66abc10 commit 706b749
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ const nextConfig = {
source: "/sitemap.xml",
destination: "/api/sitemap.xml",
},
{
source: "/api/posthog/:path*",
destination: "https://app.posthog.com/:path*",
},
{
source: "/api/bugsnag/notify",
destination: "https://notify.bugsnag.com",
Expand Down
2 changes: 1 addition & 1 deletion src/v2/components/Providers/PostHogProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const isUserRejectedError = (errorMessage: any) =>

if (typeof window !== "undefined") {
posthog.init(env.NEXT_PUBLIC_POSTHOG_KEY, {
api_host: "/api/posthog",
api_host: "https://posthog.guild.xyz",
// Capture custom events only
autocapture: false,

Expand Down

0 comments on commit 706b749

Please sign in to comment.