Filtering specific URI in CrowdSec profile

Hi, I'm trying to fine-tune my CrowdSec profile to avoid false bans caused by Immich (self-hosted photo manager), which triggers http-crawl-non_statics due to many API calls like /api/album/. My current profile: name: immich_filter filters: - Alert.Remediation == true && Alert.GetScenario() in ["crowdsecurity/http-crawl-non_statics"] decisions: - type: ban duration: 1h on_success: break Now I want to only match if the request URI contains /api/album/, but I can't get it working. I tried: filter: Alert.Meta.http_path contains "/api/album/" and similar variations, but CrowdSec won't start or the filter fails silently. How can I properly filter by request URI in a profile? Any working example or hint would be great – thanks!
1 Reply
CrowdSec
CrowdSec2mo ago
Important Information
Thank you for getting in touch with your support request. To expedite a swift resolution, could you kindly provide the following information? Rest assured, we will respond promptly, and we greatly appreciate your patience. While you wait, please check the links below to see if this issue has been previously addressed. If you have managed to resolve it, please use run the command /resolve or press the green resolve button below.
Log Files
If you possess any log files that you believe could be beneficial, please include them at this time. By default, CrowdSec logs to /var/log/, where you will discover a corresponding log file for each component.
Guide Followed (CrowdSec Official)
If you have diligently followed one of our guides and hit a roadblock, please share the guide with us. This will help us assess if any adjustments are necessary to assist you further.
Screenshots
Please forward any screenshots depicting errors you encounter. Your visuals will provide us with a clear view of the issues you are facing.
© Created By WhyAydan for CrowdSec ❤️

Did you find this page helpful?