-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: endless capturing /s/ #1551
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: +1.38 kB (+0.04%) Total Size: 3.14 MB
ℹ️ View Unchanged
|
const ignorePostHogPaths = (data: CapturedNetworkRequest): CapturedNetworkRequest | undefined => { | ||
const ignorePostHogPaths = ( | ||
data: CapturedNetworkRequest, | ||
apiHostConfig: PostHogConfig['api_host'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to filter from ui_host
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so... I think it's just the possible endless loop of capturing our own api calls with our own api calls 🤞
We check for
/s/
,/e/
, and/i/
in URL's pathname and don't capture network payloads to themBut 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 checkOtherwise 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