Skip to content

Commit 7b7d576

Browse files
authored
Infrastructure: Update link-checker User-Agent string (#3264)
Updates the User-Agent string to be more up-to-date. Outdated versions in the previous string prevented navigation to certain websites.
1 parent 11ab69e commit 7b7d576

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/link-checker.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,13 @@ async function checkLinks() {
154154
headers: {
155155
// Spoof a normal looking User-Agent to keep the servers happy
156156
// See https://github.com/JustinBeckwith/linkinator/blob/main/src/index.ts
157+
//
158+
// To better future-proof against the ua string being
159+
// responsible for any breakage, pull common, up-to-date strings
160+
// from a reliable source.
161+
// https://github.com/w3c/aria-practices/issues/3270
157162
'User-Agent':
158-
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36',
163+
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/605.1.1',
159164
},
160165
});
161166
const text = await response.text();

0 commit comments

Comments
 (0)