Archived
The proxy and links are below /labelhaus, the old /brother addresses are redirected there. The home page names all printers it prints on.
This commit is contained in:
1 parent
06bfa6f537
commit
b1cfe03fa1
4 files changed
+15
-7
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user