Skip to content
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

fix: add user agent to remote images request #2104

Merged
merged 1 commit into from
Sep 1, 2022
Merged

fix: add user agent to remote images request #2104

merged 1 commit into from
Sep 1, 2022

Conversation

apollisa
Copy link
Contributor

Fixes #2099

  • Have you updated CHANGELOG.md?

@LinusU
Copy link
Collaborator

LinusU commented Aug 29, 2022

I'm not sure if it's great to send the version of canvas being used, or even that canvas is at all.

What do we think about mimicking what Chrome is doing here:
https://www.chromium.org/updates/ua-reduction/#TOC-Proposed-Rollout-Plan

I'm not sure if we even want to expose which platform we are running though, maybe just pick something and stick with it?

e.g.

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36

(102 seems to be an LTS version, we could bump this every ~6 months, ref)

This way we won't inadvertently leak something that the user isn't expecting to be exposed, and we also should be somewhat indistinguishable from one of the most common browsers. So we should get stuck in even less filters...

@apollisa
Copy link
Contributor Author

I see no problem with this, I just based myself upon what curl is doing, but your solution looks good too. I’ll change this right away. 😃

Copy link
Collaborator

@LinusU LinusU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@apollisa
Copy link
Contributor Author

apollisa commented Sep 1, 2022

Just for info @LinusU, how soon can we expect the fix to be 1) merged 2) released?

@zbjornson zbjornson merged commit 3fb4ed9 into Automattic:master Sep 1, 2022
@zbjornson
Copy link
Collaborator

I can make a release later today.

@apollisa apollisa deleted the fix/2099-remote-image-user-agent branch September 1, 2022 16:30
@zbjornson
Copy link
Collaborator

@apollisa v2.10.0 is published, sorry for the delay.

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.

Setting request headers for remote image requests
3 participants