Skip to content

Commit

Permalink
Added rack-canonical-host for domain redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Dec 10, 2014
1 parent 2f069c5 commit 544bba6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -22,6 +22,7 @@ gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
gem 'octicons-rails'
gem 'rack-canonical-host'

group :development do
gem 'better_errors'
Expand Down
4 changes: 4 additions & 0 deletions Gemfile.lock
Expand Up @@ -247,6 +247,9 @@ GEM
rabl (0.11.5)
activesupport (>= 2.3.14)
rack (1.5.2)
rack-canonical-host (0.1.0)
addressable
rack (~> 1.0)
rack-google-analytics (1.2.0)
actionpack
activesupport
Expand Down Expand Up @@ -446,6 +449,7 @@ DEPENDENCIES
pullreview-coverage
quiet_assets
rabl
rack-canonical-host
rack-google-analytics
rails (= 4.1.8)
rails_12factor
Expand Down
3 changes: 3 additions & 0 deletions config.ru
@@ -1,5 +1,8 @@
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)

use Rack::Deflater
use Rack::CanonicalHost, ENV['CANONICAL_HOST'] if ENV['CANONICAL_HOST']

run Tfpullrequests::Application

0 comments on commit 544bba6

Please sign in to comment.