If you wish to disable access to all routes of your application and redirect every requested route to a certain route, this can be done with a
This can be configured in
class ApplicationController < Sinatra::Base.# Set maintenance routemaintenance enabled: true doerb :maintenance, layout: falseend..end
This action is typically rendering a static webpage that details the reasons for maintenance:
class ApplicationController < Sinatra::Base.# Set maintenance routemaintenance enabled: true dorender_static '/maintenance.html'end..end
maintenance simply is just a
get route, so some sort of rendering, redirecting, or other valid return must be done.