IzyPro / WatchDog

WatchDog is a Realtime Message, Event, HTTP (Request & Response) and Exception logger and viewer for ASP.Net Core Web Apps and APIs. It allows developers log and view messages, events, http requests made to their web application and also exception caught during runtime in their web applications, all in Realtime.
MIT License
765 stars 115 forks source link

Negation in Blacklist Regex is not working #151

Closed zakutansky closed 5 months ago

zakutansky commented 5 months ago

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):

zakutansky commented 5 months ago

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