Skip to content

Commit 4ede4c4

Browse files
committed
refactor: move external rewrites from next.config.ts to vercel.json
1 parent ac4bd43 commit 4ede4c4

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

lib/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const REVALIDATE_MIN_REGISTRATION = TTL_REGISTRATION_REGISTERED; // 24h (
9393

9494
// ===== Background Job Configuration =====
9595
// How often the cron job runs to drain the revalidation queue
96-
export const DRAIN_CRON_MINUTES = 10;
96+
export const DRAIN_CRON_MINUTES = 15;
9797

9898
export const PER_SECTION_BATCH = 50;
9999
export const MAX_EVENTS_PER_RUN = 100;

next.config.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ let nextConfig: NextConfig = {
1616
},
1717
rewrites: async () => {
1818
return [
19-
{
20-
source: "/_proxy/ingest/static/:path*",
21-
destination: "https://us-assets.i.posthog.com/static/:path*",
22-
},
23-
{
24-
source: "/_proxy/ingest/:path*",
25-
destination: "https://us.i.posthog.com/:path*",
26-
},
2719
{
2820
source: "/healthz",
2921
destination: "/api/healthz",

vercel.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,24 @@
33
"build": {
44
"env": {
55
"ENABLE_EXPERIMENTAL_COREPACK": "1",
6-
"PUPPETEER_SKIP_DOWNLOAD": "1",
7-
"NPM_CONFIG_NODE_LINKER": "hoisted"
6+
"NPM_CONFIG_NODE_LINKER": "hoisted",
7+
"PUPPETEER_SKIP_DOWNLOAD": "1"
88
}
99
},
10+
"rewrites": [
11+
{
12+
"source": "/_proxy/ingest/static/:path*",
13+
"destination": "https://us-assets.i.posthog.com/static/:path*"
14+
},
15+
{
16+
"source": "/_proxy/ingest/:path*",
17+
"destination": "https://us.i.posthog.com/:path*"
18+
}
19+
],
1020
"crons": [
1121
{
1222
"path": "/api/cron/due-drain",
13-
"schedule": "*/10 * * * *"
23+
"schedule": "*/15 * * * *"
1424
},
1525
{
1626
"path": "/api/cron/access-sync",
@@ -22,7 +32,7 @@
2232
},
2333
{
2434
"path": "/api/cron/pricing-refresh",
25-
"schedule": "0 0 * * *"
35+
"schedule": "0 4 * * *"
2636
}
2737
]
2838
}

0 commit comments

Comments
 (0)