Skip to content

Add request header routing #13

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

Open
techwraith opened this issue Jun 16, 2013 · 2 comments
Open

Add request header routing #13

techwraith opened this issue Jun 16, 2013 · 2 comments

Comments

@techwraith
Copy link

It would be great if Barista allowed us to match routes based on the request's headers. It would help a lot when allowing custom domain support.

router.match('/').where({headers: {host: 'somesite.com'}})
@kieran
Copy link
Owner

kieran commented Jun 17, 2013

While Barista has no knowledge of the request itself (nor do I think it should, separation of concerns etc...), I could certainly hack in a way of matching arbitrary params, then Geddy would pass in a hash of whatever as a third parameter for matching.

@techwraith
Copy link
Author

That would work for our use case :)

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

No branches or pull requests

2 participants