Added authentication to axios.defaults.proxy

This commit is contained in:
SamTV12345 2025-04-08 18:40:00 +02:00 committed by SamTV12345
parent 77792a5f7f
commit d62d5a0460
4 changed files with 15 additions and 5 deletions

View file

@ -172,12 +172,14 @@ export const getAvailablePlugins = (maxCacheAge: number|false) => {
}
await axios.get(`${settings.updateServer}/plugins.json`, {headers})
.then((pluginsLoaded:AxiosResponse<MapArrayType<PackageInfo>>) => {
.then((pluginsLoaded: AxiosResponse<MapArrayType<PackageInfo>>) => {
availablePlugins = pluginsLoaded.data;
cacheTimestamp = nowTimestamp;
resolve(availablePlugins);
})
.catch(async (err) => reject(err));
.catch(async (err) => {
logger.error(`Error fetching available plugins: ${err}`);
});
});
};