Commit 74ae687
committed
fix(posthog): read server PostHog config from env vars directly
The PR removed runtimeConfig.public.posthog from nuxt.config.ts since
@posthog/nuxt manages it via posthogConfig. However server/utils/posthog.ts
still referenced config.public.posthog?.publicKey/host which TypeScript
no longer recognises (TS2339).
Switch to process.env.POSTHOG_PUBLIC_KEY / POSTHOG_HOST directly — this is
server-only code running in Nitro, which has full access to process.env,
and avoids the redundant runtimeConfig round-trip.1 parent 4c11f99 commit 74ae687
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
0 commit comments