New filtering in MouseHole
why the lucky stiff
why at hobix.com
Sun Sep 4 14:59:08 EDT 2005
Kevin Ballard wrote:
> How you use the new feature is you simply add a call to rewrite(). It
> takes 2 args. The first is a regex to match against host:port, so you
> might use /^(www\.)?google\.com:80/ to match against google. The
> second is a regex to match against the path after /.mouseHole/, so to
> match http://www.google.com/.mouseHole/ping you would use %r{^/ping $}.
Great, thankyou for the patch. This is lovely. Do you mind if I mix
this with the register_url idea?
For a foreign URL:
register_url( "http://google.com/test.js" ) do |req, res|
# no `uri' arg needed, we'll do magic to make the req.request_uri
work fine.
end
For accessing MouseHole directly:
register_url( "/wiki" ) do |req, res|
end
We could normalize the ports and subdomains from inside MouseHole.
> Oh, and I don't suppose MouseHole could be hosted in an SVN repo
> instead of a CVS repo? I'm using SVK to wrap it (because I hate using
> CVS), but it's slow to sync changes in the repo.
Well, I'd like to stick with Rubyforge. I'm pretty impartial on
repository software. They'll switch to SVN soon I'm sure.
_why
More information about the Mousehole-scripters
mailing list