File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ const nextConfig = {
5252 } ,
5353 { source : '/ingest/:path*' , destination : 'https://us.i.posthog.com/:path*' } ,
5454 { source : '/ingest/decide' , destination : 'https://us.i.posthog.com/decide' } ,
55+ // Rewrite API routes with trailing slash to without trailing slash to prevent redirects
56+ {
57+ source : '/api/:path*/' ,
58+ destination : '/api/:path*' ,
59+ } ,
5560 ] ;
5661 } ,
5762 ...( isStaticExport === 'true' && { output : 'export' } ) ,
@@ -89,9 +94,7 @@ const getPostHogProjectName = () => {
8994 return 'Normal_Development' ;
9095 }
9196
92- return (
93- posthogConfig . projectName || ( network === 'mainnet' ? 'Normal_Mainnet' : 'Normal_Testnet' )
94- ) ;
97+ return posthogConfig . projectName || ( network === 'mainnet' ? 'Normal_Mainnet' : 'Normal_Testnet' ) ;
9598} ;
9699
97100const posthogOptions = {
You can’t perform that action at this time.
0 commit comments