add useragent header to commands contacting APIs

This commit is contained in:
Emily 2021-02-26 13:16:47 +11:00
parent aa2d1a99f6
commit 460fccd543
9 changed files with 29 additions and 8 deletions

View file

@ -27,7 +27,7 @@ module.exports = class {
fetch('https://gamecp.apex.to/api/client/servers/1fc76afa-9a4d-497b-983a-a898795ab5b5/power', {
method: 'post',
body: JSON.stringify({ 'signal': 'restart' }),
headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${client.config.server}` }
headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${client.config.server}`, 'User-Agent': client.config.userAgent }
});
}
};