Add requested path to www redirect

This commit is contained in:
swaggboi 2022-02-12 18:54:27 -05:00
parent 32370ce76c
commit 9a3de4e2d5

View File

@ -3,9 +3,8 @@
require 'sinatra' require 'sinatra'
before do before do
redirect("https://www.#{request.host + request.path_info}") \
unless settings.development? || request.host =~ /^www\./ unless settings.development? || request.host =~ /^www\./
redirect("https://www.#{request.host}/")
end
end end
get '/*' do get '/*' do