Closed jcubic closed 4 years ago
I totally won't be saving IP addresses on my server. I thought about checking if the source IP is from one of GitHubs servers as they are the ones actually requesting the badge if you see it in GitHub READMEs, but I don't know if I will yet.
You don't need to save IP address just the hash of the IP. like md5 or CRC if you need something shorter.
I agree with @jcubic, just store the hash. A page refresh counter is not useful at all, this issue should be re-opened.
I agree with @jcubic, just store the hash. A page refresh counter is not useful at all, this issue should be re-opened.
well, it's a visit counter, I whitelisted the github cdn crawler ip subnet so people can't bot visits and the cache expiration is set to 10 minutes so you shouldn't be able to increase the counter by refreshing continously
I think now it's ok, The original problem what the I was able to open https://badges.pufler.dev/visits/jcubic/jquery.terminal in browser and refresh I refreshed it 3 times this badge was never added anywere.
One note someone may publish the package to npm and npm don't use cache. I don't think it should be limited to GitHub repositories. Maybe there should be option to toggle: git only or IP limit.
It would be more useful to have visitors counter not page refresh counter. So save IP adres and if it's unique per instance then increase the counter.