Commit a901469
committed
fix(vercel-analytics): sink insight POSTs in dev to avoid 404s
Vercel Analytics collects via a relative `/_vercel/insights/*` endpoint
served by Vercel's edge. Outside Vercel (including `nuxt dev`) there is
no upstream, so the script POSTs to the local origin and 404s.
Register a dev-only handler that returns 204 on that path when
vercelAnalytics is enabled. Script behaviour, options (mode/debug), and
proxy domains are unchanged.1 parent f4a4df6 commit a901469
2 files changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
530 | 540 | | |
531 | 541 | | |
532 | 542 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments