add useragent headers

This commit is contained in:
2024-07-17 10:24:07 +02:00
parent 9f71ad0f8e
commit a848f078be
4 changed files with 60 additions and 9 deletions

View File

@@ -10,7 +10,12 @@ const releasesUrl =
module.exports = {
updateAvailable: async () => {
try {
const latestRelease = await fetch(repoApiUrl);
const latestRelease = await fetch(repoApiUrl, {
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0",
},
});
const json = await latestRelease.json();
if (json.length <= 0) return false;
return {