IzyPro/WatchDog

Negation in Blacklist Regex is not working

Closed this issue · 1 comments

Description
Negation in Regex is not working.

To Reproduce
I wanted to block all endpoints which does not match "/api/v1/Start" so I've set Blacklist to @"^(?!/api/v1/Start)" and UseRegexForBlacklisting = true.
But now its not loggin /api/v1/Start endpoint even if this does not match the regex.

Expected behavior
I would expect enpoint /api/v1/Start to be logged when my Blacklist is set to @"^(?!/api/v1/Start)".

Details (please complete the following information):

  • Project Type: API
  • Framework Version .NET 6
  • WatchDog Version 1.4.1.1
  • Database Default
  • Browser Edge

Without the / at the beggining its working fine. So the solution is Blacklist set to @"^(?!api/v1/Start)"