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
@@ -378,6 +394,86 @@ This Ip will be used instead of the current X-Forwarded-For Ip if any.
378
394
379
395
**Must be empty in production.**
380
396
397
+
398
+
399
+
#### Settings update with WP-CLI tool
400
+
401
+
Here are some examples of how to set options with the `WP-CLI` tool.
402
+
403
+
**:warning:** : Some actions are triggered by a manual modification of the settings in the admin interface. Setting flagged with **:warning:** triggers some action. For example, changing the cache system triggers a cache flush of the old cache system. Modifying those values with `WP-CLI` will not trigger these actions.
|`Fallback to`| - <code>wp option set crowdsec_fallback_remediation ban</code><br />- <code>wp option set crowdsec_fallback_remediation captcha</code><br />- <code>wp option set crowdsec_fallback_remediation bypass</code> |
459
+
|`Trust these CDN IPs (or Load Balancer, HTTP Proxy)`| When the `crowdsec_trust_ip_forward` is set, the `crowdsec_trust_ip_forward_array` is populated with a serialized array of comparable IPs.<br />Thus, to maintain consistency between admin display and database data, you should update the 2 options: <br />`wp option set crowdsec_trust_ip_forward 1.2.3.4`<br />`wp option set crowdsec_trust_ip_forward_array --format=json '[["001.002.003.004","001.002.003.004"]]'`|
460
+
|`Hide CrowdSec mentions`| - <code>wp option set crowdsec_hide_mentions on</code><br />- <code>echo -n ""\| wp option set crowdsec_hide_mentions</code> |
461
+
|**Advanced settings** → *Geolocation*||
462
+
|`Enable geolocation feature`| - <code>wp option set crowdsec_geolocation_enabled on</code><br />- <code>echo -n ""\| wp option set crowdsec_geolocation_enabled</code> |
463
+
|`Geolocation type`|`wp option set crowdsec_geolocation_type maxmind`|
464
+
|`MaxMind database type`| - <code>wp option set crowdsec_geolocation_maxmind_database_type country</code><br />- <code>wp option set crowdsec_geolocation_maxmind_database_type city</code> |
465
+
|`Path to the MaxMind database`|`wp option set crowdsec_geolocation_maxmind_database_path GeoLite2-City.mmdb`|
466
+
|`Geolocation cache lifetime`| - <code>wp option set crowdsec_geolocation_cache_duration 86400</code><br />- <code>wp option set crowdsec_geolocation_cache_duration 0</code> |
467
+
|**Advanced settings** → *Debug mode*||
468
+
|`Enable debug mode`| - <code>wp option set crowdsec_debug_mode on</code><br />- <code>echo -n ""\| wp option set crowdsec_debug_mode</code> |
469
+
|`Disable prod log`| - <code>wp option set crowdsec_disable_prod_log on</code><br />- <code>echo -n ""\| wp option set crowdsec_disable_prod_log</code> |
470
+
|`Enable errors display`| - <code>wp option set crowdsec_display_errors on</code><br />- <code>echo -n ""\| wp option set crowdsec_display_errors</code> |
471
+
|**Advanced settings** → *Test settings*||
472
+
|`Forced test IP`|`wp option set crowdsec_forced_test_ip 1.2.3.4`|
473
+
|`Forced test X-Forwarded-For IP`| <code>wp option set crowdsec_forced_test_forwarded_ip 1.2.3.4</code> |
474
+
475
+
476
+
381
477
### Auto Prepend File mode
382
478
383
479
By default, this extension will bounce every web requests that pass through the classical process of WordPress core loading.
0 commit comments