Skip to content

Conversation

@dsavenko
Copy link

Hi,

This PR adds the CORSANYWHERE_USERAGENT env var to overwrite user agent.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 2abaa78 on dsavenko:master into 4814647 on Rob--W:master.

@Rob--W
Copy link
Owner

Rob--W commented Jun 25, 2019

Why?

Note that the standard allows clients to already change the User-Agent header via XHR/fetch. Firefox has already been updated to match the spec; Chrome is lagging behind: https://bugs.chromium.org/p/chromium/issues/detail?id=571722

@dsavenko
Copy link
Author

Well, Chrome is the main reason. The bug is there since 2015 and has the lowest priority. I don't think they're going to fix it soon.

@Rob--W
Copy link
Owner

Rob--W commented Jun 28, 2019

Why?

I mean, why do you want to override the user agent from CORS Anywhere? This seems like quite specific functionality that is not generally useful to most users.

@dsavenko
Copy link
Author

dsavenko commented Jul 1, 2019

I've got a website, which redirects to mobile version based on User-Agent. Since I'm accessing it via fetch from the client side, I always get the mobile version instead of the desktop one, which is not what I want.

Afaik, it's a common trick to redirect to mobile version based on User-Agent. So, may be I'm not alone in this trouble.

P.S. If you want more details, I'm not trying to do anything shady. I'm developing an online RSS reader, and that website also redirects its RSS link to the mobile version, but their mobile version doesn't have that RSS resource (i.e. I get HTTP 404 after the redirect). Clearly, this is a misconfiguration on their side. I contacted them, but they refused to fix it, because 'users should use special applications to access RSS, not the browser' (their answer).

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.

3 participants