2024-05-03 03:04:43 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require_relative "boot"
|
2024-05-03 23:06:08 +00:00
|
|
|
require_relative "../lib/middleware/custom_static"
|
|
|
|
require_relative "../lib/middleware/dev_host"
|
2024-05-03 03:04:43 +00:00
|
|
|
|
|
|
|
require "rails/all"
|
|
|
|
|
|
|
|
# Require the gems listed in Gemfile, including any gems
|
|
|
|
# you've limited to :test, :development, or :production.
|
|
|
|
Bundler.require(*Rails.groups)
|
|
|
|
|
|
|
|
require_relative "default_config"
|
|
|
|
require_relative "local_config"
|
|
|
|
|
|
|
|
module Websites
|
|
|
|
class Application < Rails::Application
|
|
|
|
# Initialize configuration defaults for originally generated Rails version.
|
|
|
|
config.load_defaults(7.1)
|
|
|
|
|
|
|
|
# Please, add to the `ignore` list any other `lib` subdirectories that do
|
|
|
|
# not contain `.rb` files, or that should not be reloaded or eager loaded.
|
|
|
|
# Common ones are `templates`, `generators`, or `middleware`, for example.
|
|
|
|
config.autoload_lib(ignore: %w[assets tasks])
|
|
|
|
|
|
|
|
# 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")
|
|
|
|
#
|
|
|
|
config.autoload_paths += Dir[Rails.root.join(Rails.root.join("config/routes/**/"))]
|
|
|
|
|
|
|
|
config.action_controller.action_on_unpermitted_parameters = :raise
|
|
|
|
config.action_dispatch.default_headers.clear
|
2024-08-06 10:57:00 +00:00
|
|
|
config.active_job.queue_adapter = :good_job
|
2024-08-06 11:34:10 +00:00
|
|
|
config.good_job.poll_interval = 10
|
|
|
|
config.good_job.enable_cron = true
|
2024-05-03 03:04:43 +00:00
|
|
|
|
2024-05-03 23:06:08 +00:00
|
|
|
config.middleware.insert_before(0, Middleware::DevHost) if Rails.env.development?
|
|
|
|
config.middleware.insert_before(ActionDispatch::Static, Middleware::CustomStatic, {
|
2024-05-03 23:01:03 +00:00
|
|
|
/^i\.furry\.cool/ => "/furry.cool/images",
|
2024-07-25 06:44:22 +00:00
|
|
|
/^i\.maid\.gay/ => "/maid.gay/images",
|
|
|
|
%r{^maid\.gay/images} => "/maid.gay",
|
|
|
|
%r{^maid\.gay/screenshots} => "/maid.gay",
|
|
|
|
/^assets\.maid\.gay/ => "/maid.gay/assets",
|
2024-05-03 23:01:03 +00:00
|
|
|
/^i\.oceanic\.ws/ => "/oceanic.ws/images",
|
|
|
|
%r{^yiff\.rest/Blep\.png$} => "/yiff.rest",
|
|
|
|
%r{^yiff\.rocks/mascots} => "/yiff.rocks",
|
2024-05-21 10:54:59 +00:00
|
|
|
%r{^yiff\.media/images} => "/yiff.media",
|
2024-05-03 23:01:03 +00:00
|
|
|
# Favicons
|
|
|
|
%r{^balls\.butts-are\.cool/favicon\.ico} => "/butts-are.cool/custom/balls",
|
|
|
|
%r{^cocks\.butts-are\.cool/favicon\.ico} => "/butts-are.cool/custom/cocks",
|
|
|
|
%r{^knots\.butts-are\.cool/favicon\.ico} => "/butts-are.cool/custom/knots",
|
|
|
|
%r{^sheaths\.butts-are\.cool/favicon\.ico} => "/butts-are.cool/custom/sheaths",
|
|
|
|
%r{^(.*\.)?butts-are\.cool/favicon\.ico} => "/butts-are.cool",
|
|
|
|
%r{^(.*\.)?e621\.ws/favicon\.ico} => "/e621.ws",
|
|
|
|
%r{^(.*\.)?furry\.cool/favicon\.ico} => "/furry.cool",
|
2024-07-25 06:44:22 +00:00
|
|
|
%r{^(.*\.)?maid\.gay/favicon\.ico} => "/maid.gay",
|
2024-05-03 23:01:03 +00:00
|
|
|
%r{^(.*\.)?oceanic\.ws/favicon\.ico} => "/oceanic.ws",
|
|
|
|
%r{^(.*\.)?yiff\.media/favicon\.ico} => "/yiff.media",
|
|
|
|
%r{^(.*\.)?yiff\.rest/favicon\.ico} => "/yiff.media",
|
|
|
|
%r{^(.*\.)?yiff\.rocks/favicon\.ico} => "/yiff.media",
|
2024-05-03 03:04:43 +00:00
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|