cs-wordpress-bouncer icon indicating copy to clipboard operation
cs-wordpress-bouncer copied to clipboard

Change to user agent reported to crowdsec_api.log to include the site name

Open cRUSHr2012 opened this issue 3 years ago • 2 comments

When reading the crowsdesc_api.log, it can be useful to know which site made the request. Maybe a custom ID, or the site name added to the user agent ?

time="14-05-2022 12:10:14" level=info msg="127.0.0.1 - [Sat, 14 May 2022 12:10:14 EEST] \"GET /v1/decisions/stream?startup=false&scopes=Ip%2CRange HTTP/1.0 200 116.225231ms \"WordPress CrowdSec Bouncer/v1.4.3\" \""

cRUSHr2012 avatar May 14 '22 09:05 cRUSHr2012

Hi,

I understand your need and will see with the core team if we can add a custom data (at the end of the user agent for example) or if we have to use an extra parameter.

We could add another optional configuration to do that.

julienloizelet avatar May 16 '22 08:05 julienloizelet

This would be very useful!

raykai avatar Jun 29 '22 03:06 raykai

Hi,

With the last 2.1.0 release, there is now a setting called Custom User-Agent in Advanced settings -> Debug mode

You can fill this field with some alphanumeric characters (maximum 5). This allows to see different user agent when reading the Crowdsec logs.

julienloizelet avatar Mar 23 '23 02:03 julienloizelet