You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: inc/admin/advanced-settings.php
+5-8Lines changed: 5 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,7 @@ function adminAdvancedSettings()
8
8
** Section "Stream mode" **
9
9
**************************/
10
10
11
-
add_settings_section('crowdsec_admin_advanced_stream_mode', 'Stream mode vs Live mode', function () {
12
-
echo"
13
-
<p>With the stream mode, all decisions are retrieved in an asynchronous way, using <em>LAPI stream mode</em> feature
14
-
<br>Advantages:<br>- Ultrashort latency<br>- IP verifications work even if LAPI is down.<br>
15
-
Limits:<br>- If traffic is low, the cache refresh (new or deleted decisions since last time) can be late.
16
-
<br>- A delay to take decisions into account is added.
17
-
</p>";
11
+
add_settings_section('crowdsec_admin_advanced_stream_mode', 'Communication method to the API', function () {
18
12
}, 'crowdsec_advanced_settings');
19
13
20
14
// Field "crowdsec_stream_mode"
@@ -25,7 +19,10 @@ function adminAdvancedSettings()
25
19
}, function () {
26
20
// Stream mode just deactivated.
27
21
unscheduleBlocklistRefresh();
28
-
}, '');
22
+
}, '
23
+
<p>With the stream mode, every decision is retrieved in an asynchronous way. 3 advantages: <br> 1) Inivisible latency when loading pages<br> 2) The IP verifications works even if your CrowdSec is not reachable.<br> 3) The API can never be overloaded by the WordPress traffic</p>
24
+
<p>Note: This method has one limit: for maximum 60 seconds, all the new decisions may not be taken into account.</p>
25
+
');
29
26
30
27
// Field "crowdsec_stream_mode_refresh_frequency"
31
28
addFieldString('crowdsec_stream_mode_refresh_frequency', 'Resync decisions each', 'crowdsec_plugin_advanced_settings', 'crowdsec_advanced_settings', 'crowdsec_admin_advanced_cache', function ($input) {
0 commit comments