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
x/website: golang.org wrongly redirects to golang.google.cn sometimes #47808
Comments
CC @dmitshur |
Also for go.dev |
As background, on the China-available Go home page we cannot serve user-generated content like playground shares. This IP-specific content bothered me and complicated caching, so I changed the code for 'golang.org in China', which is supposed to not happen anymore (golang.org was visible in China for a few months back in ~2016, long story) to redirect to golang.google.cn, before any cache lookups. Then any caching done after the redirect in the serving path is fine. This redirect has the effect of making it much clearer when we accidentally think a request is coming from China. Before, a few links would be missing and people wouldn't notice at all. Now, the redirect happens, which is more noticeable. Especially if the redirect changes a go.dev request to golang.org, which breaks the request entirely. I put the old serving stack back up at https://oldstack-dot-golang-org.appspot.com/golang.org/. I will also look into why the geolocation is not working correctly. I wish we didn't have to do any of this, of course, but it is well beyond my powers to change these rules. |
@rsc There's no "Share". |
@rsc thanks for the explanation! I always appreciate how thoughtful you are.
I do not.
Thank you. FWIW: the IP addresses in question are attached to my VPS which is located (five minutes from me!) in Seattle. If I'm not signed in, Google redirects me to
I understand—it's definitely unfortunate. |
Thanks for checking the old site. Now that we have the separate domain, I've gotten approval to drop the IP-based check here entirely. That should be in effect within a day or so and will fix this problem for golang.org. |
Change https://golang.org/cl/344289 mentions this issue: |
As of right now the IP-based check should no longer be active. Thanks for the reports. |
The IP-based detection of requests from China is from back in 2015 when we were preparing to serve golang.org directly in China. In 2018 we arranged to use golang.google.cn instead, but the old IP-based detection has lingered. It is no longer required, and it has false positives, so remove it. Fixes golang/go#47808. Change-Id: Ia7854456f8c0614c55007688e65c3c62c1799f33 Reviewed-on: https://go-review.googlesource.com/c/website/+/344289 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Website-Publish: Russ Cox <rsc@golang.org>
Upon visiting
golang.org
I'm redirected togolang.google.cn
. This is wrong as my IP addresses are from the United States.IPv6: 2001:19f0:8001:1ef6:5400:3ff:fe84:5ac
IPv4: 144.202.86.213
Also affects the playground.
The text was updated successfully, but these errors were encountered: