You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
152764: cmd/urlcheck: use custom user-agent to appease Wikipedia's WAF r=darrylwong a=srosenberg
It appears that Wikipedia started blocking default user-agents as of 08/25/25 [1]. This correlates with the recent avalanche of failures of `TestNightlyLint`. The attempt to request `https://en.wikipedia.org/wiki/Cron` started to fail with 403,
```
HTTP/1.1 403
Forbidden Connection: close
Content-Length: 92
Content-Type: text/plain
Server: HAProxy
X-Analytics:
X-Cache: cp1100 int
X-Cache-Status: int-tls
```
This change replaces Go's default UA with a custom one. According to Wikipedia's policy [2], we're now in
compliance, which is confirmed by running locally
and getting 200 instead of 403.
[1] https://phabricator.wikimedia.org/T400119
[2] https://foundation.wikimedia.org/wiki/Policy:Wikimedia_Foundation_User-Agent_PolicyFixes: #152705Fixes: #152706Fixes: #152707Fixes: #152708Fixes: #152709Fixes: #152710Fixes: #152711Fixes: #152712Fixes: #152713
Epic: none
Release note: None
Co-authored-by: Stan Rosenberg <[email protected]>
0 commit comments