Accept any route; redirect to www (in prod)

This commit is contained in:
swaggboi 2022-02-12 18:09:59 -05:00
parent c5888f8236
commit 2ba7a4414c

View File

@ -2,6 +2,12 @@
require 'sinatra' require 'sinatra'
get '/' do before do
unless settings.development? || request.host =~ /^www\./
redirect("https://www.#{request.host}/")
end
end
get '/*' do
erb(:index) erb(:index)
end end