Skip to content

Commit dcbc066

Browse files
authored
fix: use /flags endpoint for nextjs rewrites (#104)
* feat: use /flags endpoint * remove packages from example
1 parent 66bf57d commit dcbc066

4 files changed

Lines changed: 22 additions & 190 deletions

File tree

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,4 @@
1-
import type { NextConfig } from "next";
2-
3-
const nextConfig: NextConfig = {
4-
/* config options here */
5-
6-
// Add PostHog rewrites
7-
async rewrites() {
8-
return [
9-
{
10-
source: "/ingest/static/:path*",
11-
destination: "https://us-assets.i.posthog.com/static/:path*",
12-
},
13-
{
14-
source: "/ingest/:path*",
15-
destination: "https://us.i.posthog.com/:path*",
16-
},
17-
{
18-
source: "/ingest/decide",
19-
destination: "https://us.i.posthog.com/decide",
20-
},
21-
];
22-
},
23-
24-
// Required to support PostHog trailing slash API requests
25-
skipTrailingSlashRedirect: true,
26-
};
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {};
273

284
export default nextConfig;

e2e-tests/test-applications/nextjs-instrumentation-client-test-app/package-lock.json

Lines changed: 14 additions & 156 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

e2e-tests/test-applications/nextjs-instrumentation-client-test-app/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
},
1111
"dependencies": {
1212
"next": "15.3.2",
13-
"posthog-js": "^1.249.2",
14-
"posthog-node": "^4.18.0",
1513
"react": "^19.0.0",
1614
"react-dom": "^19.0.0"
1715
},

0 commit comments

Comments
 (0)