diff --git a/.github/workflows/end-to-end-auto-prepend-test-suite.yml b/.github/workflows/end-to-end-auto-prepend-test-suite.yml index 82b404ef..1976a681 100644 --- a/.github/workflows/end-to-end-auto-prepend-test-suite.yml +++ b/.github/workflows/end-to-end-auto-prepend-test-suite.yml @@ -48,7 +48,7 @@ jobs: - name: Install DDEV env: - DDEV_VERSION: v1.21.1 + DDEV_VERSION: v1.21.4 run: | # @see https://ddev.readthedocs.io/en/stable/#installationupgrade-script-linux-and-macos-armarm64-and-amd64-architectures sudo apt-get -qq update diff --git a/.github/workflows/end-to-end-test-suite.yml b/.github/workflows/end-to-end-test-suite.yml index bf7f7ecb..e8db9d59 100644 --- a/.github/workflows/end-to-end-test-suite.yml +++ b/.github/workflows/end-to-end-test-suite.yml @@ -48,7 +48,7 @@ jobs: - name: Install DDEV env: - DDEV_VERSION: v1.21.1 + DDEV_VERSION: v1.21.4 run: | # @see https://ddev.readthedocs.io/en/stable/#installationupgrade-script-linux-and-macos-armarm64-and-amd64-architectures sudo apt-get -qq update diff --git a/docs/DEVELOPER.md b/docs/DEVELOPER.md index e46b0b54..4cdd4626 100644 --- a/docs/DEVELOPER.md +++ b/docs/DEVELOPER.md @@ -54,16 +54,8 @@ __We will suppose here that you want to install WordPress 5.9. Please change "5. #### DDEV installation -This project is fully compatible with DDEV 1.21.1, and it is recommended to use this specific version. -For the DDEV installation, please follow the [official instructions](https://ddev.readthedocs.io/en/stable/#installation). -On a Linux distribution, you can run: -``` -sudo apt-get -qq update -sudo apt-get -qq -y install libnss3-tools -curl -LO https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh -bash install_ddev.sh v1.21.1 -rm install_ddev.sh -``` +This project is fully compatible with DDEV 1.21.4, and it is recommended to use this specific version. +For the DDEV installation, please follow the [official instructions](https://ddev.readthedocs.io/en/stable/users/install/ddev-installation/). ### Prepare DDEV WordPress environment diff --git a/docs/USER_GUIDE.md b/docs/USER_GUIDE.md index db5aac20..5ab0f8ed 100644 --- a/docs/USER_GUIDE.md +++ b/docs/USER_GUIDE.md @@ -149,10 +149,19 @@ By default, `file_get_contents` method is used to call Local API. This method re Here, you can choose to use `cURL` requests instead. Beware that in this case, you need to have php `cURL` extension installed and enabled on your system. + +*** + +`Connection details → Local API request timeout` + +By default, the maximum allowed time to perform a Local API request is 120 seconds. You can change this setting here. +If you set a negative value, request timeout will be unlimited. + ![Connection details](images/screenshots/config-bouncing.jpg) *** + `Bouncing → Bouncing level` Choose if you want to apply CrowdSec directives (`Normal bouncing`) or be more permissive (`Flex bouncing`). diff --git a/docs/images/screenshots/config-connection-details.jpg b/docs/images/screenshots/config-connection-details.jpg index f2ec079c..d8078f5a 100644 Binary files a/docs/images/screenshots/config-connection-details.jpg and b/docs/images/screenshots/config-connection-details.jpg differ diff --git a/inc/admin/settings.php b/inc/admin/settings.php index aa7db147..540cc7ff 100644 --- a/inc/admin/settings.php +++ b/inc/admin/settings.php @@ -68,7 +68,7 @@ function adminSettings()
If not checked, calls are done with file_get_contents method (allow_url_fopen is required for this).

'); // Field "timeout" - addFieldString('crowdsec_api_timeout', 'Local Api request timeout', 'crowdsec_plugin_settings', 'crowdsec_settings', + addFieldString('crowdsec_api_timeout', 'Local API request timeout', 'crowdsec_plugin_settings', 'crowdsec_settings', 'crowdsec_admin_connection', function ($input) { if ((int) $input === 0) { add_settings_error('Local API timeout', 'crowdsec_error', 'Local API timeout: Must be different than 0.'); @@ -77,7 +77,7 @@ function adminSettings() } return (int) $input !== 0 ? (int) $input : Constants::API_TIMEOUT ; - }, ' seconds.

Authorized timeout for a Local API request.
Set a negative value to allow unlimited timeout.
Default to' . Constants::API_TIMEOUT .'.', + }, ' seconds.

Maximum execution time (in seconds) for a Local API request.
Set a negative value (e.g. -1) to allow unlimited request timeout.
Default to ' . Constants::API_TIMEOUT .'.', Constants::API_TIMEOUT, 'width: 115px;', 'number'); /************************************