Accept any route; redirect to www (in prod)
This commit is contained in:
parent
c5888f8236
commit
2ba7a4414c
@ -2,6 +2,12 @@
|
||||
|
||||
require 'sinatra'
|
||||
|
||||
get '/' do
|
||||
before do
|
||||
unless settings.development? || request.host =~ /^www\./
|
||||
redirect("https://www.#{request.host}/")
|
||||
end
|
||||
end
|
||||
|
||||
get '/*' do
|
||||
erb(:index)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user