pull down to refresh

We proxy all images so that your ip isn't leaked to the image host.
Oh interesting, didn't know this was possible. How do you do this? Just call the website from backend? How do you make sure an .jpg url actually is an image like it says it is?
How do you do this? Just call the website from backend?
Yeah, you can kind of think of us as serving as a VPN for images on the site.
How do you make sure an .jpg url actually is an image like it says it is?
We send an http HEAD request to the url which specifies the type.
reply
How do you make sure an .jpg url actually is an image like it says it is?
We don't. If the website responds with "image" in it's Content-type header to our HEAD request, we proxy it. If not, it will be displayed as a URL on which a user can click.
If it turns out to not be an image during rendering, the image won't be rendered but I would blame the website then since they gave us wrong information.
The assumption is that this will work in 99% of the cases and when we find edge cases, we can think about other solutions.
reply