<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,6 @@
+2009-06-05 - Sean Huber (shuber@huberry.com)
+  * Add multiple domain support for rack
+
 2009-06-04 - Sean Huber (shuber@huberry.com)
   * Update test related rake tasks
   * Remove huberry namespace</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,11 @@ module Proxy
   private
   
     def self.before_dispatch(dispatcher)
-      request = dispatcher.instance_variable_get('@request')
+      request = dispatcher.instance_variable_get('@request') || dispatcher.instance_variable_get('@env')
+      if request.is_a?(Hash)
+        request.each(&amp;:inspect) # TODO: we can't access the 'rack.request' key without doing this first...wtf
+        request = request['rack.request']
+      end
       new_host = replace_host_with_proc.call(request)
       request.env['HTTP_X_FORWARDED_HOST'] = [request.host, new_host].join(', ') unless new_host.blank?
     end</diff>
      <filename>lib/proxy.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7e8baf259b427335a82dfb88a34dfbfe25affaf2</id>
    </parent>
  </parents>
  <author>
    <name>Sean Huber</name>
    <email>shuber@huberry.com</email>
  </author>
  <url>http://github.com/shuber/proxy/commit/bfe769c7158a6483eb22942543617dbeb9082395</url>
  <id>bfe769c7158a6483eb22942543617dbeb9082395</id>
  <committed-date>2009-06-05T01:07:29-07:00</committed-date>
  <authored-date>2009-06-05T01:07:29-07:00</authored-date>
  <message>Add multiple domain support for rack</message>
  <tree>8fe055b3d830b86e3cf97955e3eef1353e3510e1</tree>
  <committer>
    <name>Sean Huber</name>
    <email>shuber@huberry.com</email>
  </committer>
</commit>
