PostHog / posthog-js

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

Posthog sets and sends over 20 cookies and nginx returns 400 error because of this #1233

Open alisher-aituarov opened 1 month ago

alisher-aituarov commented 1 month ago

Bug Description

Bug description

Posthog started sending bunch of cookies to server which results to nginx to return 400 Bas Request: request header or cookie too large Issue took place before posthog-js/react version bump, and did not go away after updating to latest version

How to reproduce

Here is the error screenshot

image

Additional context

here is one of the cookies: ph___omit_place_holder__93a540aa59348983af558260d596d43b34382f85_posthog=%7B%22distinct_id%22%3A%22410e5afc-3932-48aa-3446-aab9abb4fa4c%22%2C%22%24sesid%22%3A%5B1712749443316%2C%22018ec7c1-d435-7851-adde-9ffd4088e235%22%2C1712748832565%5D%7D;

Debug info

- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
pauldambra commented 4 weeks ago

hey @alisher-aituarov

i think you're referring to posthog-js so i've moved the issue here

could you explain a little more about your setup? the text omit_place_holder isn't in any of our repos https://github.com/search?q=repo%3APostHog%2Fposthog-js%20omit_place_holder&type=code so I'm hoping this is an implementation error we can help you identify