server: support authorization header on webhook update

This commit is contained in:
Koushik Dutta
2022-10-02 19:56:11 -07:00
parent 4375cca1df
commit dc3f0f49c3
3 changed files with 9 additions and 4 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/server",
"version": "0.3.1",
"version": "0.3.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/server",
"version": "0.3.1",
"version": "0.3.2",
"license": "ISC",
"dependencies": {
"@ffmpeg-installer/ffmpeg": "^1.1.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/server",
"version": "0.3.1",
"version": "0.3.2",
"description": "",
"dependencies": {
"@ffmpeg-installer/ffmpeg": "^1.1.0",

View File

@@ -18,7 +18,12 @@ export class ServiceControl {
async update() {
const webhookUpdate = process.env.SCRYPTED_WEBHOOK_UPDATE;
if (webhookUpdate) {
const response = await axios.get(webhookUpdate);
const webhookUpdateAuthorization = process.env.SCRYPTED_WEBHOOK_UPDATE_AUTHORIZATION;
const response = await axios.get(webhookUpdate, {
headers: {
Authorization: webhookUpdateAuthorization,
}
});
return response.data;
}
else {