Merge pull request #9924 from prlanzarin/upstream-2.2-webhooks-timeout
bbb-webhooks: add a timeout configuration to be used on POST requests
This commit is contained in:
commit
a6eda3da91
@ -65,6 +65,7 @@ module.exports = class CallbackEmitter extends EventEmitter {
|
||||
const serverDomain = config.get("bbb.serverDomain");
|
||||
const sharedSecret = config.get("bbb.sharedSecret");
|
||||
const bearerAuth = config.get("bbb.auth2_0");
|
||||
const timeout = config.get('hooks.requestTimeout');
|
||||
|
||||
// data to be sent
|
||||
// note: keep keys in alphabetical order
|
||||
@ -85,7 +86,8 @@ module.exports = class CallbackEmitter extends EventEmitter {
|
||||
form: data,
|
||||
auth: {
|
||||
bearer: sharedSecret
|
||||
}
|
||||
},
|
||||
timeout
|
||||
};
|
||||
}
|
||||
else {
|
||||
@ -103,7 +105,8 @@ module.exports = class CallbackEmitter extends EventEmitter {
|
||||
maxRedirects: 10,
|
||||
uri: callbackURL,
|
||||
method: "POST",
|
||||
form: data
|
||||
form: data,
|
||||
timeout
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,9 @@ hooks:
|
||||
permanentURLs:
|
||||
__name: PERMANENT_HOOKS
|
||||
__format: json
|
||||
requestTimeout:
|
||||
__name: REQUEST_TIMEOUT
|
||||
__format: json
|
||||
redis:
|
||||
host: REDIS_HOST
|
||||
port: REDIS_PORT
|
||||
|
@ -47,6 +47,8 @@ hooks:
|
||||
- 60000
|
||||
# Reset permanent interval when exceeding maximum attemps
|
||||
permanentIntervalReset: 8
|
||||
# Hook's request module timeout for socket conn establishment and/or responses (ms)
|
||||
requestTimeout: 5000
|
||||
|
||||
# Mappings of internal to external meeting IDs
|
||||
mappings:
|
||||
|
Loading…
Reference in New Issue
Block a user