5 ms·
How does this deal with GitHub's caching of images? https://github.com/blog/1766-proxying-user-images https://github.com/blog/1766-proxying-user-images They r
by akerl_ 11y ago
How does this deal with GitHub's caching of images?
https://github.com/blog/1766-proxying-user-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
- benwilber0 11y agoGithub'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 https://github.com/atmos/camo
- orf 11y agoHeh, 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/ https://bitdeli.com/
- techaddict009 11y agoInteresting find!
- benwilber0 11y agotheir 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.
- dookahku 11y agoI 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!