require_relative "boot"

require "rails/all"

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module Dashboard
  class Application < Rails::Application
    # Initialize configuration defaults for originally generated Rails version.
    config.load_defaults 7.0
    config.active_job.queue_adapter = :sidekiq

    config.action_dispatch.default_headers = {
      "X-Content-Type-Options" => "nosniff",

      # NOTE: Modern Rails versions (>= 5.1) often set 'X-Frame-Options' and
      # 'X-XSS-Protection' by default, but it's good practice to ensure they are present.
      # You should rely on CSP for XSS protection, but this is a defense-in-depth measure.
      "X-XSS-Protection" => "1; mode=block",
      "X-Frame-Options" => "SAMEORIGIN"
    }

    # Configuration for the application, engines, and railties goes here.
    #
    # These settings can be overridden in specific environments using the files
    # in config/environments, which are processed later.
    #
    # config.time_zone = "Central Time (US & Canada)"
    # config.eager_load_paths << Rails.root.join("extras")
  end
end
