# HG changeset patch # User nanaya # Date 1734280778 -32400 # Node ID cd927bb7dc0dc4ef63de625712f463a218e614c6 # Parent 8c47a69cbfdbe72d9394766d688d5e6172cdff55 Move out custom application config diff -r 8c47a69cbfdb -r cd927bb7dc0d config/application.rb --- a/config/application.rb Sun Dec 15 23:01:58 2024 +0900 +++ b/config/application.rb Mon Dec 16 01:39:38 2024 +0900 @@ -14,8 +14,6 @@ # require "action_cable/engine" require "rails/test_unit/railtie" -require_relative "config_init" - # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) @@ -37,20 +35,5 @@ # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") - - # this isn't actually used but railties *production* checks this variable during boot. - config.secret_key_base = "herp a derp" - - config.middleware.delete ActionDispatch::HostAuthorization - config.middleware.delete ActionDispatch::Cookies - config.middleware.delete ActionDispatch::ContentSecurityPolicy::Middleware - config.middleware.delete ActionDispatch::PermissionsPolicy::Middleware - config.middleware.delete ActionDispatch::RemoteIp - - config.session_store :disabled - - if $cfg[:redis_server] - config.cache_store = :redis_cache_store, { url: "#{$cfg[:redis_server]}" } - end end end diff -r 8c47a69cbfdb -r cd927bb7dc0d config/initializers/00rsstweet.rb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/initializers/00rsstweet.rb Mon Dec 16 01:39:38 2024 +0900 @@ -0,0 +1,16 @@ +require_relative "../config_init" + +# this isn't actually used but railties *production* checks this variable during boot. +Rails.application.config.secret_key_base = "herp a derp" + +Rails.application.config.middleware.delete ActionDispatch::HostAuthorization +Rails.application.config.middleware.delete ActionDispatch::Cookies +Rails.application.config.middleware.delete ActionDispatch::ContentSecurityPolicy::Middleware +Rails.application.config.middleware.delete ActionDispatch::PermissionsPolicy::Middleware +Rails.application.config.middleware.delete ActionDispatch::RemoteIp + +Rails.application.config.session_store :disabled + +if $cfg[:redis_server] + Rails.application.config.cache_store = :redis_cache_store, { url: "#{$cfg[:redis_server]}" } +end