Add requested path to www redirect
This commit is contained in:
parent
32370ce76c
commit
9a3de4e2d5
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user