PostHog / posthog-js

Send usage data from your web app or site to PostHog, with autocapture.
https://posthog.com/docs/libraries/js
Other
303 stars 126 forks source link

fix: endless capturing /s/ #1551

Closed pauldambra closed 3 days ago

pauldambra commented 3 days ago

We check for /s/, /e/, and /i/ in URL's pathname and don't capture network payloads to them

But if you use a reverse proxy then the pathname won't necessarily be /s/ e.g. some folk use /ingest/s/ so we need a slightly different check

Otherwise when you visit one of these sites we endlessly send a network payload to ourselves recording that we just sent a network payload to ourselves etc

vercel[bot] commented 3 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Nov 26, 2024 8:50am
github-actions[bot] commented 3 days ago

Size Change: +1.38 kB (+0.04%)

Total Size: 3.14 MB

Filename Size Change
dist/array.full.es5.js 255 kB +136 B (+0.05%)
dist/array.full.js 358 kB +138 B (+0.04%)
dist/array.full.no-external.js 357 kB +138 B (+0.04%)
dist/array.js 172 kB +138 B (+0.08%)
dist/array.no-external.js 171 kB +138 B (+0.08%)
dist/main.js 173 kB +138 B (+0.08%)
dist/module.full.js 358 kB +138 B (+0.04%)
dist/module.full.no-external.js 357 kB +138 B (+0.04%)
dist/module.js 173 kB +138 B (+0.08%)
dist/module.no-external.js 171 kB +138 B (+0.08%)
ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `dist/all-external-dependencies.js` | 206 kB | | `dist/dead-clicks-autocapture.js` | 14.3 kB | | `dist/exception-autocapture.js` | 9.37 kB | | `dist/external-scripts-loader.js` | 2.29 kB | | `dist/recorder-v2.js` | 115 kB | | `dist/recorder.js` | 115 kB | | `dist/surveys-preview.js` | 57.6 kB | | `dist/surveys.js` | 63.2 kB | | `dist/tracing-headers.js` | 1.75 kB | | `dist/web-vitals.js` | 10.3 kB |

compressed-size-action