Skip to content

Instantly share code, notes, and snippets.

@champierre
Created November 2, 2010 13:35
Show Gist options
  • Save champierre/659613 to your computer and use it in GitHub Desktop.
Save champierre/659613 to your computer and use it in GitHub Desktop.
module Lokka
module RedirectIfHeroku
def self.registered(app)
app.before do
site_url = ENV['SITE_URL'] || 'http://heroku.com'
redirect site_url, 301 if request.host =~ /\.heroku\.com$/
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment