The bouncer only allows to set one captcha key in the configuration, meaning it cannot handle multiple domains.
We need to allow override of the key defined in the configuration on a per-location/server basic with a variable, for example:
server {
server_name foo.com;
set $crowdsec_bouncer_captcha_provider "hcaptcha";
set $crowdsec_bouncer_captcha_secret_key "XXXXX";
set $crowdsec_bouncer_captcha_site_key "XXXXX";
location / {
....
}
}
# If nothing is set, take the value from the bouncer config file
server {
server_name bar.com;
location / {
....
}
}