Earlier quoted context omitted.
And you are now in violation of GDPR
if that's true, how is every single tracking pixel on the web not in violation of the GDPR?
Wondering what to do (if anything) about hotlinking
31–40 of 49 posts
Re: Wondering what to do (if anything) about hotlinking
#32Earlier quoted context omitted.
And you are now in violation of GDPR
I'm not an expert on GDPR at all so forgive me if these are dumb questions but how? I thought GDPR pertained to a user's personal info? Sending back info about the webpage the script is used on isn't the same. Also who would be in violation, the leachers or the OP? Does GDPR even apply if OP is just a random person on the internet and not a company operating in the EU?
Re: Wondering what to do (if anything) about hotlinking
#33The author is too kind. I don't know why you should bend over backwards for anti-social folks, it just allows them to perpetuate their bad behavior.
Doing this obviously risks your own site breaking if the linked source changes anything or goes away. That’s a serious risk which no reasonable web developer would knowingly accept.
Re: Wondering what to do (if anything) about hotlinking
#34Earlier quoted context omitted.
I'm not an expert on GDPR at all so forgive me if these are dumb questions but how? I thought GDPR pertained to a user's personal info? Sending back info about the webpage the script is used on isn't the same. Also who would be in violation, the leachers or the OP? Does GDPR even apply if OP is just a random person on the internet and not a company operating in the EU?
The request would send back personally identifiable information (IP address), which if the OP stored (say in an access log), without establishing a legal basis, then it would be a GDPR violation. By OP, since the tracking is occuring on their server and not at the behest of some other data controller.
Re: Wondering what to do (if anything) about hotlinking
#35I would just add some console.log message explaining the issue you have with hotlinking the script. This will not disrupt users, but anyone who fires up their devtools will see that the site is getting shamed. And if their devs care just a little bit, I think they will find it embarrassing enough to host the script themselves. Correct me if I simply have missed it, but is there an official NPM package available? I ha…
Re: Wondering what to do (if anything) about hotlinking
#36It doesn't break their page if you take ten seconds to serve the JS, but it makes their page slow, and nobody likes a slow page. And it's pretty obvious where the slowdown is coming from.
If it's easy, make it fast from your site and slow if the referer doesn't match or isn't present. Or just make it always slow, whatever.
Re: Wondering what to do (if anything) about hotlinking
#37Instead of a nasty console message or popup, modify the script to ping back more detailed and useful information about where its being used. Then contact the developers. Edit: you don't even need to write anything dynamic to receive the ping back, just have the script load an image from yoursite.com/specialprefix/the useresencodedbrowserurl/anythingelseinteresting/1.png then look in your server logs for any 404 error…
And you are now in violation of GDPR
Re: Wondering what to do (if anything) about hotlinking
#38I disagree. Public CDNs (which is what I take the sentence to be referring to) can be convenient for prototyping, but should be completely avoided for production work. Due to HTTP/2+, cache partitioning, and the ease of private CDNs (which were difficult and expensive even ten years ago, whereas now it’s common for entire sites to be hosted on a private CDN), public CDNs no longer offer any benefit at all in most common/sensible scenarios, and negligible benefit in the near-worst-case scenario, but have performance costs (establishing an extra HTTPS connection) and introduce significant functionality and security risks.
For a good article with some more detail: https://httptoolkit.com/blog/public-cdn-risks/
Re: Wondering what to do (if anything) about hotlinking
#39Probably the nicest way to handle this is to serve the JS slowly. It doesn't break their page if you take ten seconds to serve the JS, but it makes their page slow, and nobody likes a slow page. And it's pretty obvious where the slowdown is coming from. If it's easy, make it fast from your site and slow if the referer doesn't match or isn't present. Or just make it always slow, whatever.
I could imagine two network interfaces, or two LBs, one internal and unmetered, another external, which serves a particular amount of megabytes per day, and throttles connections accordingly. Maybe even add some HTTP header, like X-bandwidth-limit: "Dear hotlinkers, I'm not going to spend more than $5 / mo on serving you; host your own copy."
Re: Wondering what to do (if anything) about hotlinking
#40Instead of a nasty console message or popup, modify the script to ping back more detailed and useful information about where its being used. Then contact the developers. Edit: you don't even need to write anything dynamic to receive the ping back, just have the script load an image from yoursite.com/specialprefix/the useresencodedbrowserurl/anythingelseinteresting/1.png then look in your server logs for any 404 error…
And you are now in violation of GDPR