From b1cfe03fa1bb522da28db4f60a0fa43de0af9777 Mon Sep 17 00:00:00 2001 From: Roman Priesol Date: Mon, 9 Nov 2026 20:14:28 +0100 Subject: [PATCH] Labelhaus instead of Brother: brother_ql_web was renamed The proxy and links are below /labelhaus, the old /brother addresses are redirected there. The home page names all printers it prints on. --- app.rb | 16 ++++++++++++---- views/_brother_bar.erb | 2 +- views/_navbar.erb | 2 +- views/index.erb | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) 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 @@