Skip to content

Not loading custom maintenance.html  #57

@ig-martinez

Description

@ig-martinez

I've been trying to load a custom html file, but haven't had any luck :/

I've tried many different configurations, changing the config.maintenance_pages_path, config.default_maintenance_page but nothing has worked, I'm assuming I'm doing something wrong.

The file seems to be loaded, but I made a few modifications that doesn't show


<header>
      <h1>This is not what the header looks like</h1>
 </header>
2.4.1 :001 > File.expand_path(Turnout::MaintenancePage::HTML.new.send(:custom_path))
"/Users/imartinez/my-fertility-ror-backend/public/maintenance.html"

This is how my initializer looks like

Turnout.configure do |config|
  config.app_root = config.app_root
  config.named_maintenance_file_paths = {default: config.app_root.join('tmp', 'maintenance.yml').to_s}
  config.maintenance_pages_path = config.app_root.join('public').to_s
  config.default_maintenance_page = Turnout::MaintenancePage::HTML
  config.default_reason = "The site is temporarily down for maintenance.\nPlease check back soon."
  config.default_allowed_paths = ['^/admin/','^/admin','^/assets', '^/rails/info/routes', '^/api/v1/maintenance_messages']
  config.default_response_code = 503
  config.default_retry_after = 7200
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions