Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Rudderlabs sets cookie for whole domain #1296

Open
dmke opened this issue Nov 13, 2020 · 2 comments
Open

Rudderlabs sets cookie for whole domain #1296

dmke opened this issue Nov 13, 2020 · 2 comments

Comments

@dmke
Copy link

dmke commented Nov 13, 2020

Summary

Rudderlabs cookies set on domain .example.com, not on mattermost.example.com.

Environment Information

  • Webapp or React Native app: Webapp
  • Mattermost Server Version: latest

Steps to reproduce

Install Mattermost on a server. Use a subdomain, e.g. https://mattermost.example.com. Visit that domain. Observe that the JS application (the 5MB main.js) sets two cookies, rl_user_id and rl_anonymous_id for the domain .example.com.

Now visit https://example.com, or https://gitlab.example.com. Observe the same cookies sent to these domains as well.

Bonus: have a development machine reachable at http://dev-42.vpn.example.com. Observe a lot of warnings for these cookies.

Expected behavior

The Rudderlabs cookies should only be set for mattermost.example.com.

Observed behavior

See above. The cookies are setup to be tracking cookies for the whole domain, including all subdomains.

Possible fixes

Confine Rudderlabs cookies to the (sub) domain Mattermost is installed on.

If that's not possible, remove Rudderlabs altogether.

@dmke
Copy link
Author

dmke commented Nov 17, 2020

More context:

We have setup a development domain (local.example.com and all its subdomains resolves to 127.0.0.1/::1). Running Mattermost on mattermost.example.com creates A LOT of noise in our dev tools:

image

This is really annoying because for each resource (font, image, stylesheet, Webpack chunk, API request, ...), I get two warnings (for the two rl_*_id cookies). The screenshot contains 2-3 screens full of warnings, masking the ones I do care for.

@coltoneshaw
Copy link
Member

@dmke - Thanks for submitting this issue! I've opened an internal ticket to track this - MM-36643.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants