Skip to content

Commit

Permalink
Append http host instead of replacing
Browse files Browse the repository at this point in the history
  • Loading branch information
shuber committed May 3, 2010
1 parent 3f6222b commit 1381d94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
2009-06-05 - Sean Huber (shuber@huberry.com)
* Fix bug with passenger
* Append http host instead of replacing

2009-06-05 - Sean Huber (shuber@huberry.com)
* Add multiple domain support for rack
Expand Down
2 changes: 1 addition & 1 deletion lib/proxy/action_controller/abstract_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def self.included(base)
def forwarded_hosts
hosts = env['HTTP_X_FORWARDED_HOST'].to_s.split(/,\s*/)
unless hosts.empty? || hosts.first != hosts.last
hosts[hosts.size - 1] = env['HTTP_HOST']
hosts << env['HTTP_HOST'] unless env['HTTP_HOST'].blank?
env['HTTP_X_FORWARDED_HOST'] = hosts.join(', ')
end
hosts
Expand Down

0 comments on commit 1381d94

Please sign in to comment.