@@ -117,6 +117,7 @@ const {
117
117
LIST_UNSUBSCRIBE_NOTIFY ,
118
118
FETCH_TIMEOUT ,
119
119
DEFAULT_MAX_BODY_SIZE ,
120
+ DEFAULT_MAX_PAYLOAD_TIMEOUT ,
120
121
DEFAULT_EENGINE_TIMEOUT ,
121
122
DEFAULT_MAX_ATTACHMENT_SIZE ,
122
123
MAX_FORM_TTL ,
@@ -202,6 +203,9 @@ const IMAP_WORKER_COUNT = getWorkerCount(readEnvValue('EENGINE_WORKERS') || (con
202
203
// NB! the default for other requests is 1MB
203
204
const MAX_BODY_SIZE = getByteSize ( readEnvValue ( 'EENGINE_MAX_BODY_SIZE' ) || config . api . maxBodySize ) || DEFAULT_MAX_BODY_SIZE ;
204
205
206
+ // Payload reception timeout in milliseconds for message upload requests
207
+ const MAX_PAYLOAD_TIMEOUT = getByteSize ( readEnvValue ( 'EENGINE_MAX_PAYLOAD_TIMEOUT' ) || config . api . maxPayloadTimeout ) || DEFAULT_MAX_PAYLOAD_TIMEOUT ;
208
+
205
209
// CORS configuration for API requests
206
210
// By default, CORS is not enabled
207
211
const CORS_ORIGINS = readEnvValue ( 'EENGINE_CORS_ORIGIN' ) || ( config . cors && config . cors . origin ) ;
@@ -3581,7 +3585,8 @@ When making API calls remember that requests against the same account are queued
3581
3585
} ,
3582
3586
options : {
3583
3587
payload : {
3584
- maxBytes : MAX_BODY_SIZE
3588
+ maxBytes : MAX_BODY_SIZE ,
3589
+ timeout : MAX_PAYLOAD_TIMEOUT
3585
3590
} ,
3586
3591
3587
3592
description : 'Upload message' ,
@@ -4627,7 +4632,8 @@ When making API calls remember that requests against the same account are queued
4627
4632
} ,
4628
4633
options : {
4629
4634
payload : {
4630
- maxBytes : MAX_BODY_SIZE
4635
+ maxBytes : MAX_BODY_SIZE ,
4636
+ timeout : MAX_PAYLOAD_TIMEOUT
4631
4637
} ,
4632
4638
4633
4639
description : 'Submit message for delivery' ,
0 commit comments