diff --git a/Pilz.Net/Api/ApiServer.cs b/Pilz.Net/Api/ApiServer.cs index a6967b4..55446c7 100644 --- a/Pilz.Net/Api/ApiServer.cs +++ b/Pilz.Net/Api/ApiServer.cs @@ -101,7 +101,10 @@ public class ApiServer(string apiUrl) : IApiServer } } if (useRegEx) + { url = url.Replace(".", "\\."); // Escape special characters + url = $"^{url}$"; // Define start and end of line (matches whole string) + } // Add handler Log.InfoFormat("Added handler for {0}", attribute.Route);