Mirrors the proven pattern from gendersloty: rewrites /ingest/* to the PostHog host so requests go through the same origin (no CORS, no ad-blocker issues). Uses PostHogProvider and usePostHog from posthog-js/react official React integration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
539 B
JavaScript
23 lines
539 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: '/ingest/static/:path*',
|
|
destination: 'https://analytics.hyggecraftery.com/static/:path*',
|
|
},
|
|
{
|
|
source: '/ingest/:path*',
|
|
destination: 'https://analytics.hyggecraftery.com/:path*',
|
|
},
|
|
{
|
|
source: '/ingest/decide',
|
|
destination: 'https://analytics.hyggecraftery.com/decide',
|
|
},
|
|
]
|
|
},
|
|
skipTrailingSlashRedirect: true,
|
|
}
|
|
|
|
export default nextConfig
|