Skip to content

Commit

Permalink
docs(timeout): Update docs for timeout setting
Browse files Browse the repository at this point in the history
  • Loading branch information
julienloizelet committed Dec 19, 2022
1 parent 33fec5d commit 7cc7711
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/end-to-end-auto-prepend-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/end-to-end-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 2 additions & 10 deletions docs/DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions docs/USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
Expand Down
Binary file modified docs/images/screenshots/config-connection-details.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions inc/admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function adminSettings()
<br>If not checked, calls are done with <i>file_get_contents</i> method (<i>allow_url_fopen</i> is required for this).</p>');

// 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.');
Expand All @@ -77,7 +77,7 @@ function adminSettings()
}

return (int) $input !== 0 ? (int) $input : Constants::API_TIMEOUT ;
}, ' seconds. <p>Authorized timeout for a Local API request.<br> Set a negative value to allow unlimited timeout.<br> Default to' . Constants::API_TIMEOUT .'.',
}, ' seconds. <p>Maximum execution time (in seconds) for a Local API request.<br> Set a negative value (e.g. -1) to allow unlimited request timeout.<br>Default to ' . Constants::API_TIMEOUT .'.',
Constants::API_TIMEOUT, 'width: 115px;', 'number');

/************************************
Expand Down

0 comments on commit 7cc7711

Please sign in to comment.