Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

host-to-regexp #62

Closed
DylanPiercey opened this issue Oct 9, 2015 · 5 comments
Closed

host-to-regexp #62

DylanPiercey opened this issue Oct 9, 2015 · 5 comments

Comments

@DylanPiercey
Copy link

Is there any consideration to allow path-to-regexp to support generating host matching regexes? As far as I can tell all that would change is that the delimiter in the regs would go from / to ..

This would be pretty handy for node servers handling multiple domains/subdomains.

@dougwilson
Copy link

With npm, there is no reason two turn a module into a kitchen sink of functionality; i.m.o that sounds like a different module (the vhost module https://github.com/expressjs/vhost does something like that already, and can probably just start using that module if desired).

Up to @blakeembrey , ultimately :)

@DylanPiercey
Copy link
Author

@dougwilson I tend to agree for sure. I was just playing around with it and path-to-regexp has a bit more utility than vhosts also it isn't tied to a framework. Was just wondering if this is something that could potentially be an easy win for this library.

@dougwilson
Copy link

RIght, but I'm a big 👎 to adding it to this lib, if only because the module is called path-to-regexp.

@blakeembrey
Copy link
Member

@DylanPiercey Can you provide more information on what this would actually look like? Currently path-to-regexp kind of already supports the period as a delimiter since it's used for extensions.

@DylanPiercey
Copy link
Author

@blakeembrey I did some more testing and it actually seems to work for everything. Originally I thought it didn't work with with regexes and matched subdomains but it looks like it does.

I'm going to close this thanks for your responses!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants