diff --git a/app.rb b/app.rb index c4c07b6..cefcb6a 100644 --- a/app.rb +++ b/app.rb @@ -499,12 +499,20 @@ post '/repository/:id/delete' do redirect '/repository' end -get '/brother' do - redirect '/brother/' +get '/labelhaus' do + redirect '/labelhaus/' end %w[get post put delete].each do |verb| - send(verb, '/brother/*') do - proxy_to_brother('/brother', '/' + params[:splat].first) + send(verb, '/labelhaus/*') do + proxy_to_brother('/labelhaus', '/' + params[:splat].first) + end +end + +# Its old address, e.g. in bookmarks +%w[get post put delete].each do |verb| + send(verb, %r{/brother(/.*)?}) do + path = '/labelhaus' + (params[:captures].first || '/') + redirect(request.query_string.empty? ? path : "#{path}?#{request.query_string}", 308) end end diff --git a/views/_brother_bar.erb b/views/_brother_bar.erb index 94a5f14..a0b1ec5 100644 --- a/views/_brother_bar.erb +++ b/views/_brother_bar.erb @@ -12,7 +12,7 @@