mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-11 16:52:38 +02:00
feat: configure PostHog reverse proxy to bypass ad blockers
- Updated PostHog initialization to use a reverse proxy for API requests. - Added rewrites in Next.js configuration to route requests through the domain. - Set ui_host for proper toolbar functionality and ensured correct pageview tracking.
This commit is contained in:
parent
518958e9a7
commit
8298efe0b1
2 changed files with 25 additions and 1 deletions
|
|
@ -31,6 +31,27 @@ const nextConfig: NextConfig = {
|
|||
}
|
||||
return config;
|
||||
},
|
||||
|
||||
// PostHog reverse proxy configuration
|
||||
// This helps bypass ad blockers by routing requests through your domain
|
||||
async rewrites() {
|
||||
return [
|
||||
{
|
||||
source: "/ingest/static/:path*",
|
||||
destination: "https://us-assets.i.posthog.com/static/:path*",
|
||||
},
|
||||
{
|
||||
source: "/ingest/:path*",
|
||||
destination: "https://us.i.posthog.com/:path*",
|
||||
},
|
||||
{
|
||||
source: "/ingest/decide",
|
||||
destination: "https://us.i.posthog.com/decide",
|
||||
},
|
||||
];
|
||||
},
|
||||
// Required for PostHog reverse proxy to work correctly
|
||||
skipTrailingSlashRedirect: true,
|
||||
};
|
||||
|
||||
// Wrap the config with MDX and next-intl plugins
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue