add useragent headers
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user