They refer to it as "proxying", but they also call out that it proxies using their CDN, which seems to imply there isn't a 1:1 relationship between user requests and hits on the backend server
Heh, someone should tell BitDeli[1]. They had to effectively shut down due to this, but if the fix is a simple as that then they will be hitting themselves.
Edit: Would it not be possible/better to just serve the SVG image direct from nginx? There is a LUA plugin, or even some direct redis stuff you could use.
their analytics service still won't work since Github's camo proxy scrubs all cookies, referers, remote addrs, etc.
edit: and regarding lua or nginx redis2, yes you could certainly do that. I happen to like the asynchronous nature of incrementing hit counters outside of the request cycle and just using nginx to serve the static badge files. But yeah there are a bunch of ways to do this.
I was about to post the exact same question as parent. I made a similar application to keep track of who was looking at my github repos. This is very helpful info! Thanks!
Back to geocities websites with hit counters! I like how it was implemented though, I simply hope I won't start seeing this everywhere from now on because it doesn't add anything to a repo to have that badge.
For anyone that is unaware, "hit count" functionality has been present in GitHub for at least several months. If you're the owner of a repository, you can view it at https://github.com/<username>/<repo>/graphs/traffic which gives you a breakdown of visitors, clones, referring sites, and which pages within your repository are popular.
If you ever wanted to filter by IP so you don't end up with tons of duplicates, it would be a nice usecase for the native hyperloglog support in Redis:
If anyone's trying to use ghit.me - beware that api rate limit from github is preventing the tool from working. May be, try again:
{
"message": "API rate limit exceeded for 107.170.25.70. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)",
"documentation_url": "https://developer.github.com/v3/#rate-limiting"
}
yep it's a pretty trivial task and there are a lot of ways to do it. i like just serving static files and incrementing hit counts outside of the request.
https://github.com/blog/1766-proxying-user-images
They refer to it as "proxying", but they also call out that it proxies using their CDN, which seems to imply there isn't a 1:1 relationship between user requests and hits on the backend server