Skip to content

Commit cb4fa72

Browse files
Adds support for watching all URLs using *. Closes #1000 (#1070)
1 parent d8b166d commit cb4fa72

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dev-proxy/ProxyEngine.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,11 @@ private void LoadHostNamesFromUrls()
298298
}
299299

300300
// extract host from the URL
301-
string urlToWatchPattern = Regex.Unescape(urlToWatch.Url.ToString()).Replace(".*", "*");
301+
string urlToWatchPattern = Regex.Unescape(urlToWatch.Url.ToString())
302+
.Trim('^', '$')
303+
.Replace(".*", "*");
302304
string hostToWatch;
303-
if (urlToWatchPattern.ToString().Contains("://"))
305+
if (urlToWatchPattern.Contains("://"))
304306
{
305307
// if the URL contains a protocol, extract the host from the URL
306308
var urlChunks = urlToWatchPattern.Split("://");

0 commit comments

Comments
 (0)