andreyvit / urlmatch.js

URL host/port/path matching (kind of like fnmatch)
1 stars 1 forks source link

Hardwired references to livereloadany #1

Open chocolateboy opened 9 years ago

chocolateboy commented 9 years ago

Any reason why the source code contains hardwired references to livereloadany? They don't appear to be relevant to a general purpose URL matcher, and look like they might cause unexpected behaviour when matching patterns that happen to contain it as a substring.

andreyvit commented 9 years ago

livereloadany is just an arbitrary string, and you're right, a better one should be used (although I doubt that it will ever be a problem in practice). It has to be a string that's valid as part of a hostname for url.parse to succeed, so no funny characters allowed; perhaps something like URLPARSEWILDCARD.

andreyvit commented 9 years ago

P.S. Pull requests are welcome :-)