97 points · by cududa · 4y ago · 25 comments
Fairly certain this is the package they based their service on https://github.com/tdewolff/minify
Edit: Here's a tweet I posted with a screenshot of the code: https://twitter.com/cullend/status/1575243757624360960?s=20&t=JVhqXDJExBnrEVOXeFH4Jg
1. Toptal uses Cloudflare for DNS
2. Toptal uses Cloudflare Insights, which automagically inserts the tracking snippet of `https://static.cloudflareinsights.com/beacon.min.js/\\*`
3. You send the request to Toptal and somewhere along the line, Cloudflare misinterprets the request and injects the tracking code
It's not anything nefarious by Toptal. It's not their minify script. It's a misconfigured page rule, or similar. It's a bug.
Feels like we've jumped the shark if you need to send un-minified stuff to another server to get minified, sort of defeating the point in the first place...
Seems insane anyone would even entertain the thought... it's trivially easy to minify whatever you want right within your app.
And now here's OP bagging on this company for not disclosing this in some ToS or whatever, even though OP is the one abusing a free, obviously not-serious service.
Most local minification packages I tried spit out garbage, so just went with their API. Took a few hours to get a proper package stood up (the one I mentioned above).
I'd generally just assume that if you're injecting tracking/ analytics into an output you'd tell folks. As they didn't mention it, thought I'd just alert folks. Not sure why you're so outraged I mentioned this is happening.
https://community.cloudflare.com/t/beacon-min-js-as-malware/...
https://developers.cloudflare.com/analytics/web-analytics/
The site owner needs to configure cloudflare correctly to add analytics on certain pages only otherwise cloudflare injects it by default.
But I agree with your point, this should have been mentioned in their ToS and/or Privacy Policy.
They provide a lot of this type of thing - rewriting HTML responses with optimizations "at the edge" instead of you doing it at your origin.
[1] https://developers.cloudflare.com/analytics/web-analytics/ge...