From: James Tucker <jftucker@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: Middleware to dispatch request to multiple applications based on request domain name
Date: Sun, 7 Feb 2010 11:57:44 +0000 [thread overview]
Message-ID: <09F3BCD8-6945-4DCC-BA70-A7F1777DC09C@gmail.com> (raw)
In-Reply-To: <debbea32-a456-497b-9fef-5618a0647101@j31g2000yqa.googlegroups.com>
On 6 Feb 2010, at 16:58, misza222 wrote:
> Hi,
>
> Here is a problem I have.
> There is an app which consists of multiple subapps. Requests needs to
> be dispatched to the particular subapp based on the domain name.
> I thought Rack::URLMap may be a solution but couldn't make it to work
> so eventually I created my own rack middleware that allowed me to
> achieve it. Here is how it looks like http://github.com/misza222/dispatch_by_domain
> But am I reinventing a wheel here? Is there any way to achieve the
> same thing with existing rack middleware?
map "http://mydomain.com/" do
run App1.new
end
map "http://otherdomain.com/" do
run App2.new
end
>
> Cheers,
>
> Michal
next prev parent reply other threads:[~2010-02-07 11:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-06 16:58 Middleware to dispatch request to multiple applications based on request domain name misza222
2010-02-07 11:57 ` James Tucker [this message]
2010-02-07 22:36 ` misza222
2010-02-07 22:54 ` Daniel N
2010-02-08 10:29 ` James Tucker
2010-02-08 21:17 ` misza222
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://groups.google.com/group/rack-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09F3BCD8-6945-4DCC-BA70-A7F1777DC09C@gmail.com \
--to=rack-devel@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).