Skip to content

Support Google Image Proxy #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

jerryluk
Copy link

I have an application that uses image tracking pixel and I notice Gmail (web and app) proxy the connection and causes user agent to return mozilla as the user agent. This pull request is to make it to support Google Image Proxy.

@gshutler
Copy link
Owner

Thanks for the PR I've had a brief look at this and I've a few concerns.

The first one is that the match on googleimageproxy is case-sensitive and from a bit of research that appears to be something to do with your logging/proxy setup as most get it through as GoogleImageProxy (example) so the regex needs to be /GoogleImageProxy/i to make it case-insensitive.

I've also seen evidence that GoogleImageProxy was a later addition so we might be better looking for via ggpht.com to support older logs.

However, my largest concern which means I need to sit down and think about this further is that I'm not sure if we're losing some information by introducing this as a different browser. It depends on the details of the proxy, which is why it requires some research, but there is other information in there which might be useful if it is directly proxied (eg. the (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 from your test differs to (Windows; U; Windows NT 5.1; de; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 in the example and others I found). I'd be loathed to lose this information if it is actually useful.

@jerryluk
Copy link
Author

I was based on what I saw in here:
http://www.adammcfarland.com/2015/03/31/a-list-of-email-client-user-agents-plus-our-most-popular-client/

The page says it returns windows nt even on Android and that's why I think the other information may not be useful. Adding case insensitive regex is reasonable which I can do a commit for it (it just the articles I found they are all in lower case). Where can I find out that GoogleImageProxy was a later addition? For my use case which I only process logs in real-time, so it won't be a problem since we are only processing new log.

Thanks for being on top of it and let me know what I can help. Cheers!

@gshutler
Copy link
Owner

It looks like it was a later addition based upon articles like this one: https://blog.filippo.io/how-the-new-gmail-image-proxy-works-and-what-this-means-for-you/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants