Hacker News new | past | comments | ask | show | jobs | submit login

How does this deal with GitHub's caching of images?

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




Github's proxy[1] respects Cache-Control headers, so it will just pass through since we use Etags and Cache-Control: no-cache.

[1]https://github.com/atmos/camo


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.

1. https://bitdeli.com/


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.


Interesting find!


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!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: