forked from alexjustesen/speedtest-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebhook-server.php
More file actions
83 lines (68 loc) · 2.24 KB
/
webhook-server.php
File metadata and controls
83 lines (68 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
return [
/*
* The default queue that should be used to send webhook requests.
*/
'queue' => 'default',
/*
* The default queue connection that should be used to send webhook requests.
*/
'connection' => null,
/*
* The default http verb to use.
*/
'http_verb' => 'post',
/*
* Proxies to use for request.
*
* See https://docs.guzzlephp.org/en/stable/request-options.html#proxy
*/
'proxy' => null,
/*
* This class is responsible for calculating the signature that will be added to
* the headers of the webhook request. A webhook client can use the signature
* to verify the request hasn't been tampered with.
*/
'signer' => \Spatie\WebhookServer\Signer\DefaultSigner::class,
/*
* This is the name of the header where the signature will be added.
*/
'signature_header_name' => 'Signature',
/*
* These are the headers that will be added to all webhook requests.
*/
'headers' => [
'Content-Type' => 'application/json',
],
/*
* If a call to a webhook takes longer that this amount of seconds
* the attempt will be considered failed.
*/
'timeout_in_seconds' => env('WEBHOOK_TIMEOUT_IN_SECONDS', 3),
/*
* The amount of times the webhook should be called before we give up.
*/
'tries' => env('WEBHOOK_TRIES', 3),
/*
* This class determines how many seconds there should be between attempts.
*/
'backoff_strategy' => \Spatie\WebhookServer\BackoffStrategy\ExponentialBackoffStrategy::class,
/*
* This class is used to dispatch webhooks on to the queue.
*/
'webhook_job' => \Spatie\WebhookServer\CallWebhookJob::class,
/*
* By default we will verify that the ssl certificate of the destination
* of the webhook is valid.
*/
'verify_ssl' => env('WEBHOOK_VERIFY_SSL', true),
/*
* When set to true, an exception will be thrown when the last attempt fails
*/
'throw_exception_on_failure' => env('WEBHOOK_THROW_EXCEPTION_ON_FAILURE', false),
/*
* When using Laravel Horizon you can specify tags that should be used on the
* underlying job that performs the webhook request.
*/
'tags' => [],
];