Browse Source

CLDC-2862: ensure cookies, notices etc still available in maintenance mode

pull/2006/head
Sam Seed 3 years ago
parent
commit
e423a40371
  1. 2
      app/controllers/application_controller.rb

2
app/controllers/application_controller.rb

@ -7,7 +7,7 @@ class ApplicationController < ActionController::Base
before_action :set_paper_trail_whodunnit
def check_maintenance
if FeatureToggle.maintenance_mode_enabled? && request.fullpath.split("?")[0].delete("/") != "service-unavailable"
if FeatureToggle.maintenance_mode_enabled? && !%w[service-unavailable accessibility-statement privacy-notice cookies].include?(request.fullpath.split("?")[0].delete("/"))
redirect_to service_unavailable_path
elsif !FeatureToggle.maintenance_mode_enabled? && request.fullpath.split("?")[0].delete("/") == "service-unavailable"
redirect_back(fallback_location: root_path)

Loading…
Cancel
Save