@@ -11,6 +11,7 @@ const {
1111 CMS_ADMIN_HOST = "admin.pycon.it" ,
1212 NEXT_PUBLIC_SITE_URL ,
1313 SENTRY_AUTH_TOKEN ,
14+ POSTHOG_KEY ,
1415} = process . env ;
1516
1617const nextConfig = {
@@ -21,6 +22,7 @@ const nextConfig = {
2122 localeDetection : false ,
2223 } ,
2324 trailingSlash : false ,
25+ skipTrailingSlashRedirect : true ,
2426 cacheHandler :
2527 process . env . VERCEL_ENV === "preview"
2628 ? undefined
@@ -89,6 +91,14 @@ const nextConfig = {
8991 source : "/graphql" ,
9092 destination : `${ API_URL_SERVER } /graphql` ,
9193 } ,
94+ {
95+ source : "/ingest/static/:path*" ,
96+ destination : "https://eu-assets.i.posthog.com/static/:path*" ,
97+ } ,
98+ {
99+ source : "/ingest/:path*" ,
100+ destination : "https://eu.i.posthog.com/:path*" ,
101+ } ,
92102 ] ;
93103
94104 if ( API_URL_SERVER . includes ( "http://backend" ) ) {
@@ -111,6 +121,7 @@ const nextConfig = {
111121 env : {
112122 API_URL : API_URL ,
113123 conferenceCode : CONFERENCE_CODE || "pycon-demo" ,
124+ POSTHOG_KEY : POSTHOG_KEY ,
114125 cmsHostname : CMS_HOSTNAME ,
115126 NEXT_PUBLIC_SITE_URL : NEXT_PUBLIC_SITE_URL
116127 ? `https://${ NEXT_PUBLIC_SITE_URL } /`
0 commit comments