Skip to content

Commit

Permalink
Merge pull request #80 from cybex-gmbh/master
Browse files Browse the repository at this point in the history
  • Loading branch information
mszulik committed Mar 12, 2024
2 parents 407f687 + 7d13100 commit 29ee0e8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion config/protector.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,16 @@
| By default the chunk size is set to 20MB.
|
*/
'chunkSize' => 20 * 1024 * 1024
'chunkSize' => 20 * 1024 * 1024,

/*
|--------------------------------------------------------------------------
| Http Timeout
|--------------------------------------------------------------------------
|
| Here you may customize the timeout for HTTP requests for receiving remote dumps.
| The default is 120 seconds.
|
*/
'httpTimeout' => env('PROTECTOR_HTTP_TIMEOUT', 120)
];
2 changes: 1 addition & 1 deletion src/Protector.php
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ protected function getConfiguredHttpRequest(): PendingRequest
);
}

return $request->withOptions(['stream' => true])->withHeaders(['Accept' => 'application/json']);
return $request->withOptions(['stream' => true])->withHeaders(['Accept' => 'application/json'])->timeout($this->getConfigValueForKey('httpTimeout', 120));
}

/**
Expand Down

0 comments on commit 29ee0e8

Please sign in to comment.